Passed
Branch master (8ceba7)
by Stefan
10:46
created
web/lib/admin/PageDecoration.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
         $retval = "<div class='sidebar'><p>";
67 67
 
68 68
         if ($advancedControls) {
69
-            $retval .= "<strong>" . _("You are:") . "</strong> ".$_SESSION['name']
69
+            $retval .= "<strong>"._("You are:")."</strong> ".$_SESSION['name']
70 70
             ."<br/>
71 71
               <br/>
72
-              <a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_user.php'>" . _("Go to your Profile page") . "</a> 
73
-              <a href='" . \core\CAT::getRootUrlPath() . "/admin/inc/logout.php'>" . _("Logout") . "</a> ";
72
+              <a href='" . \core\CAT::getRootUrlPath()."/admin/overview_user.php'>"._("Go to your Profile page")."</a> 
73
+              <a href='" . \core\CAT::getRootUrlPath()."/admin/inc/logout.php'>"._("Logout")."</a> ";
74 74
         }
75
-        $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/'>" . _("Start page") . "</a>
75
+        $retval .= "<a href='".\core\CAT::getRootUrlPath()."/'>"._("Start page")."</a>
76 76
             </p>
77 77
         </div> <!-- sidebar -->";
78 78
         \core\common\Entity::outOfThePotatoes();
@@ -96,23 +96,23 @@  discard block
 block discarded – undo
96 96
                     <h1>$cap1</h1>
97 97
                 </div><!--header_captions-->
98 98
                 <div id='langselection' style='padding-top:20px; padding-left:10px;'>
99
-                    <form action='$place' method='GET' accept-charset='UTF-8'>" . _("View this page in") . "&nbsp;
99
+                    <form action='$place' method='GET' accept-charset='UTF-8'>"._("View this page in")."&nbsp;
100 100
                         <select id='lang' name='lang' onchange='this.form.submit()'>";
101 101
 
102 102
         foreach (\config\Master::LANGUAGES as $lang => $getValue) {
103
-            $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $getValue['display'] . "</option> ";
103
+            $retval .= "<option value='$lang' ".(strtoupper($language) == strtoupper($lang) ? "selected" : "")." >".$getValue['display']."</option> ";
104 104
         }
105 105
         $retval .= "</select>";
106 106
 
107 107
         foreach ($_GET as $getVar => $getValue) {
108 108
             $filterValue = filter_input(INPUT_GET, $getVar, FILTER_SANITIZE_STRING);
109 109
             if ($getVar != "lang" && $getValue != "") {
110
-                $retval .= "<input type='hidden' name='" . htmlspecialchars($getVar) . "' value='" . htmlspecialchars($filterValue) . "'>";
110
+                $retval .= "<input type='hidden' name='".htmlspecialchars($getVar)."' value='".htmlspecialchars($filterValue)."'>";
111 111
             }
112 112
         }
113 113
         $retval .= "</form>
114 114
                 </div><!--langselection-->";
115
-        $logoUrl = \core\CAT::getRootUrlPath() . "/resources/images/consortium_logo.png";
115
+        $logoUrl = \core\CAT::getRootUrlPath()."/resources/images/consortium_logo.png";
116 116
         $retval .= "<div class='consortium_logo'>
117 117
                     <img id='test_locate' src='$logoUrl' alt='Consortium Logo'>
118 118
                 </div> <!-- consortium_logo -->
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
         if (isset(\config\Master::APPEARANCE['MOTD']) && \config\Master::APPEARANCE['MOTD'] != "") {
207 207
             $retval .= "<div id='header_MOTD' style='display:inline-block; padding-left:20px;vertical-align:top;'>
208
-              <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD'] . "</p>
208
+              <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD']."</p>
209 209
               </div><!--header_MOTD-->";
210 210
         }
211 211
         $retval .= $this->sidebar($advancedControls);
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
           <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'>
232 232
           <head lang='$ourlocale'>
233 233
           <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
234
-        $cssUrl = \core\CAT::getRootUrlPath() . "/resources/css/cat.css.php";
234
+        $cssUrl = \core\CAT::getRootUrlPath()."/resources/css/cat.css.php";
235 235
         $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />";
236
-        $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>";
236
+        $retval .= "<title>".htmlspecialchars($pagetitle)."</title>";
237 237
         return $retval;
238 238
     }
239 239
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             // we may need to jump up one dir if we are either in admin/ or accountstatus/
248 248
             // (accountstatus courtesy of my good mood. It's userspace not admin space so
249 249
             // it shouldn't be using this function any more.)
250
-            $logoBase = \core\CAT::getRootUrlPath() . "/resources/images";
250
+            $logoBase = \core\CAT::getRootUrlPath()."/resources/images";
251 251
             return "<span id='logos' style='position:fixed; left:50%;'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/>
252 252
               <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span>
253 253
               <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>";
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
             <table style='width:100%'>
270 270
                 <tr>
271 271
                     <td style='padding-left:20px; padding-right:20px; text-align:left; vertical-align:top;'>
272
-                        " . $cat->CAT_COPYRIGHT . "</td>";
272
+                        " . $cat->CAT_COPYRIGHT."</td>";
273 273
         if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) {
274
-            $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>";
274
+            $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>";
275 275
         }
276 276
         $retval .= "            <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'>";
277 277
 
Please login to merge, or discard this patch.
core/diag/RADIUSTests.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             }
165 165
         }
166 166
 
167
-        $this->loggerInstance->debug(4, "RADIUSTests is in opMode " . $this->opMode . ", parameters were: $realm, $outerUsernameForChecks, " . print_r($supportedEapTypes, true));
167
+        $this->loggerInstance->debug(4, "RADIUSTests is in opMode ".$this->opMode.", parameters were: $realm, $outerUsernameForChecks, ".print_r($supportedEapTypes, true));
168 168
         $this->loggerInstance->debug(4, print_r($expectedServerNames, true));
169 169
         $this->loggerInstance->debug(4, print_r($expectedCABundle, true));
170 170
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 $returnarray[] = RADIUSTests::CERTPROB_WILDCARD_IN_NAME;
252 252
                 continue; // otherwise we'd ALSO complain that it's not a real hostname
253 253
             }
254
-            if ($onename != "" && filter_var("foo@" . idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) {
254
+            if ($onename != "" && filter_var("foo@".idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) {
255 255
                 $returnarray[] = RADIUSTests::CERTPROB_NOT_A_HOSTNAME;
256 256
             }
257 257
         }
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
             $probValue = RADIUSTests::CERTPROB_SHA1_SIGNATURE;
278 278
             $returnarray[] = $probValue;
279 279
         }
280
-        $this->loggerInstance->debug(4, "CERT IS: " . print_r($intermediateCa, TRUE));
280
+        $this->loggerInstance->debug(4, "CERT IS: ".print_r($intermediateCa, TRUE));
281 281
         if ($intermediateCa['basicconstraints_set'] == 0) {
282 282
             $returnarray[] = RADIUSTests::CERTPROB_NO_BASICCONSTRAINTS;
283 283
         }
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
     public function udpReachability($probeindex, $opnameCheck = TRUE, $frag = TRUE) {
326 326
         // for EAP-TLS to be a viable option, we need to pass a random client cert to make eapol_test happy
327 327
         // the following PEM data is one of the SENSE EAPLab client certs (not secret at all)
328
-        $clientcert = file_get_contents(dirname(__FILE__) . "/clientcert.p12");
328
+        $clientcert = file_get_contents(dirname(__FILE__)."/clientcert.p12");
329 329
         if ($clientcert === FALSE) {
330 330
             throw new Exception("A dummy client cert is part of the source distribution, but could not be loaded!");
331 331
         }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         if ($this->opMode == self::RADIUS_TEST_OPERATION_MODE_THOROUGH) {
335 335
             return $this->udpLogin($probeindex, $this->supportedEapTypes[0]->getArrayRep(), $this->outerUsernameForChecks, 'eaplab', $opnameCheck, $frag, $clientcert);
336 336
         }
337
-        return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@" . $this->realm, 'eaplab', $opnameCheck, $frag, $clientcert);
337
+        return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@".$this->realm, 'eaplab', $opnameCheck, $frag, $clientcert);
338 338
     }
339 339
 
340 340
     /**
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
             return RADIUSTests::CERTPROB_NO_CDP_HTTP;
356 356
         }
357 357
         // first and second sub-match is the full URL... check it
358
-        $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1] . $crlUrl[2]));
358
+        $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1].$crlUrl[2]));
359 359
         if ($crlcontent === FALSE) {
360 360
             return RADIUSTests::CERTPROB_NO_CRL_AT_CDP_URL;
361 361
         }
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         fclose($pipes[1]);
387 387
         fclose($pipes[2]);
388 388
         $retval = proc_close($process);
389
-        if ($retval != 0 || !preg_match("/BEGIN X509 CRL/",$pem)) {
389
+        if ($retval != 0 || !preg_match("/BEGIN X509 CRL/", $pem)) {
390 390
             // this was not a real CRL
391 391
             return RADIUSTests::CERTPROB_NO_CRL_AT_CDP_URL;
392 392
         }
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
         $origLength = strlen($hex);
409 409
         for ($i = 1; $i < $origLength; $i++) {
410 410
             if ($i % 2 == 1 && $i != strlen($hex)) {
411
-                $spaced .= $hex[$i] . " ";
411
+                $spaced .= $hex[$i]." ";
412 412
             } else {
413 413
                 $spaced .= $hex[$i];
414 414
             }
@@ -492,19 +492,19 @@  discard block
 block discarded – undo
492 492
         $eapText = \core\common\EAP::eapDisplayName($eaptype);
493 493
         $config = '
494 494
 network={
495
-  ssid="' . \config\Master::APPEARANCE['productname'] . ' testing"
495
+  ssid="' . \config\Master::APPEARANCE['productname'].' testing"
496 496
   key_mgmt=WPA-EAP
497 497
   proto=WPA2
498 498
   pairwise=CCMP
499 499
   group=CCMP
500 500
   ';
501 501
 // phase 1
502
-        $config .= 'eap=' . $eapText['OUTER'] . "\n";
502
+        $config .= 'eap='.$eapText['OUTER']."\n";
503 503
         $logConfig = $config;
504 504
 // phase 2 if applicable; all inner methods have passwords
505 505
         if (isset($eapText['INNER']) && $eapText['INNER'] != "") {
506
-            $config .= '  phase2="auth=' . $eapText['INNER'] . "\"\n";
507
-            $logConfig .= '  phase2="auth=' . $eapText['INNER'] . "\"\n";
506
+            $config .= '  phase2="auth='.$eapText['INNER']."\"\n";
507
+            $logConfig .= '  phase2="auth='.$eapText['INNER']."\"\n";
508 508
         }
509 509
 // all methods set a password, except EAP-TLS
510 510
         if ($eaptype != \core\common\EAP::EAPTYPE_TLS) {
@@ -520,11 +520,11 @@  discard block
 block discarded – undo
520 520
         }
521 521
 
522 522
 // inner identity
523
-        $config .= '  identity="' . $inner . "\"\n";
524
-        $logConfig .= '  identity="' . $inner . "\"\n";
523
+        $config .= '  identity="'.$inner."\"\n";
524
+        $logConfig .= '  identity="'.$inner."\"\n";
525 525
 // outer identity, may be equal
526
-        $config .= '  anonymous_identity="' . $outer . "\"\n";
527
-        $logConfig .= '  anonymous_identity="' . $outer . "\"\n";
526
+        $config .= '  anonymous_identity="'.$outer."\"\n";
527
+        $logConfig .= '  anonymous_identity="'.$outer."\"\n";
528 528
 // done
529 529
         $config .= "}";
530 530
         $logConfig .= "}";
@@ -585,13 +585,13 @@  discard block
 block discarded – undo
585 585
      * @return string the command-line for eapol_test
586 586
      */
587 587
     private function eapolTestConfig($probeindex, $opName, $frag) {
588
-        $cmdline = \config\Diagnostics::PATHS['eapol_test'] .
589
-                " -a " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['ip'] .
590
-                " -s " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['secret'] .
591
-                " -o serverchain.pem" .
592
-                " -c ./udp_login_test.conf" .
593
-                " -M 22:44:66:CA:20:" . sprintf("%02d", $probeindex) . " " .
594
-                " -t " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['timeout'] . " ";
588
+        $cmdline = \config\Diagnostics::PATHS['eapol_test'].
589
+                " -a ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['ip'].
590
+                " -s ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['secret'].
591
+                " -o serverchain.pem".
592
+                " -c ./udp_login_test.conf".
593
+                " -M 22:44:66:CA:20:".sprintf("%02d", $probeindex)." ".
594
+                " -t ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['timeout']." ";
595 595
         if ($opName) {
596 596
             $cmdline .= '-N126:s:"1cat.eduroam.org" ';
597 597
         }
@@ -620,10 +620,10 @@  discard block
 block discarded – undo
620 620
      * @throws Exception
621 621
      */
622 622
     private function createCArepository($tmpDir, &$intermOdditiesCAT, $servercert, $eapIntermediates, $eapIntermediateCRLs) {
623
-        if (!mkdir($tmpDir . "/root-ca-allcerts/", 0700, true)) {
623
+        if (!mkdir($tmpDir."/root-ca-allcerts/", 0700, true)) {
624 624
             throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-allcerts/\n");
625 625
         }
626
-        if (!mkdir($tmpDir . "/root-ca-eaponly/", 0700, true)) {
626
+        if (!mkdir($tmpDir."/root-ca-eaponly/", 0700, true)) {
627 627
             throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-eaponly/\n");
628 628
         }
629 629
 // make a copy of the EAP-received chain and add the configured intermediates, if any
@@ -637,15 +637,15 @@  discard block
 block discarded – undo
637 637
             }
638 638
             if ($decoded['ca'] == 1) {
639 639
                 if ($decoded['root'] == 1) { // save CAT roots to the root directory
640
-                    file_put_contents($tmpDir . "/root-ca-eaponly/configuredroot" . count($catRoots) . ".pem", $decoded['pem']);
641
-                    file_put_contents($tmpDir . "/root-ca-allcerts/configuredroot" . count($catRoots) . ".pem", $decoded['pem']);
640
+                    file_put_contents($tmpDir."/root-ca-eaponly/configuredroot".count($catRoots).".pem", $decoded['pem']);
641
+                    file_put_contents($tmpDir."/root-ca-allcerts/configuredroot".count($catRoots).".pem", $decoded['pem']);
642 642
                     $catRoots[] = $decoded['pem'];
643 643
                 } else { // save the intermediates to allcerts directory
644
-                    file_put_contents($tmpDir . "/root-ca-allcerts/cat-intermediate" . count($catIntermediates) . ".pem", $decoded['pem']);
644
+                    file_put_contents($tmpDir."/root-ca-allcerts/cat-intermediate".count($catIntermediates).".pem", $decoded['pem']);
645 645
                     $intermOdditiesCAT = array_merge($intermOdditiesCAT, $this->propertyCheckIntermediate($decoded));
646 646
                     if (isset($decoded['CRL']) && isset($decoded['CRL'][0])) {
647 647
                         $this->loggerInstance->debug(4, "got an intermediate CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain");
648
-                        file_put_contents($tmpDir . "/root-ca-allcerts/crl_cat" . count($catIntermediates) . ".pem", $decoded['CRL'][0]);
648
+                        file_put_contents($tmpDir."/root-ca-allcerts/crl_cat".count($catIntermediates).".pem", $decoded['CRL'][0]);
649 649
                     }
650 650
                     $catIntermediates[] = $decoded['pem'];
651 651
                 }
@@ -654,26 +654,26 @@  discard block
 block discarded – undo
654 654
         // save all intermediate certificates and CRLs to separate files in 
655 655
         // both root-ca directories
656 656
         foreach ($eapIntermediates as $index => $onePem) {
657
-            file_put_contents($tmpDir . "/root-ca-eaponly/intermediate$index.pem", $onePem);
658
-            file_put_contents($tmpDir . "/root-ca-allcerts/intermediate$index.pem", $onePem);
657
+            file_put_contents($tmpDir."/root-ca-eaponly/intermediate$index.pem", $onePem);
658
+            file_put_contents($tmpDir."/root-ca-allcerts/intermediate$index.pem", $onePem);
659 659
         }
660 660
         foreach ($eapIntermediateCRLs as $index => $onePem) {
661
-            file_put_contents($tmpDir . "/root-ca-eaponly/intermediateCRL$index.pem", $onePem);
662
-            file_put_contents($tmpDir . "/root-ca-allcerts/intermediateCRL$index.pem", $onePem);
661
+            file_put_contents($tmpDir."/root-ca-eaponly/intermediateCRL$index.pem", $onePem);
662
+            file_put_contents($tmpDir."/root-ca-allcerts/intermediateCRL$index.pem", $onePem);
663 663
         }
664 664
 
665 665
         $checkstring = "";
666 666
         if (isset($servercert['CRL']) && isset($servercert['CRL'][0])) {
667 667
             $this->loggerInstance->debug(4, "got a server CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain");
668 668
             $checkstring = "-crl_check_all";
669
-            file_put_contents($tmpDir . "/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]);
670
-            file_put_contents($tmpDir . "/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]);
669
+            file_put_contents($tmpDir."/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]);
670
+            file_put_contents($tmpDir."/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]);
671 671
         }
672 672
 
673 673
 
674 674
 // now c_rehash the root CA directory ...
675
-        system(\config\Diagnostics::PATHS['c_rehash'] . " $tmpDir/root-ca-eaponly/ > /dev/null");
676
-        system(\config\Diagnostics::PATHS['c_rehash'] . " $tmpDir/root-ca-allcerts/ > /dev/null");
675
+        system(\config\Diagnostics::PATHS['c_rehash']." $tmpDir/root-ca-eaponly/ > /dev/null");
676
+        system(\config\Diagnostics::PATHS['c_rehash']." $tmpDir/root-ca-allcerts/ > /dev/null");
677 677
         return $checkstring;
678 678
     }
679 679
 
@@ -704,12 +704,12 @@  discard block
 block discarded – undo
704 704
 // the error log will complain if we run this test against an empty file of certs
705 705
 // so test if there's something PEMy in the file at all
706 706
         if (filesize("$tmpDir/serverchain.pem") > 10) {
707
-            exec(\config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly);
708
-            $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n");
709
-            $this->loggerInstance->debug(4, "Chain verify pass 1: " . print_r($verifyResultEaponly, TRUE) . "\n");
710
-            exec(\config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts);
711
-            $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n");
712
-            $this->loggerInstance->debug(4, "Chain verify pass 2: " . print_r($verifyResultAllcerts, TRUE) . "\n");
707
+            exec(\config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly);
708
+            $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n");
709
+            $this->loggerInstance->debug(4, "Chain verify pass 1: ".print_r($verifyResultEaponly, TRUE)."\n");
710
+            exec(\config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts);
711
+            $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n");
712
+            $this->loggerInstance->debug(4, "Chain verify pass 2: ".print_r($verifyResultAllcerts, TRUE)."\n");
713 713
         }
714 714
 
715 715
 
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
         // we are UNHAPPY if no names match!
776 776
         $happiness = "UNHAPPY";
777 777
         foreach ($this->expectedServerNames as $expectedName) {
778
-            $this->loggerInstance->debug(4, "Managing expectations for $expectedName: " . print_r($servercert['CN'], TRUE) . print_r($servercert['sAN_DNS'], TRUE));
778
+            $this->loggerInstance->debug(4, "Managing expectations for $expectedName: ".print_r($servercert['CN'], TRUE).print_r($servercert['sAN_DNS'], TRUE));
779 779
             if (array_search($expectedName, $servercert['CN']) !== FALSE && array_search($expectedName, $servercert['sAN_DNS']) !== FALSE) {
780 780
                 $this->loggerInstance->debug(4, "Totally happy!");
781 781
                 $happiness = "TOTALLY";
@@ -819,11 +819,11 @@  discard block
 block discarded – undo
819 819
         $theconfigs = $this->wpaSupplicantConfig($eaptype, $finalInner, $finalOuter, $password);
820 820
         // the config intentionally does not include CA checking. We do this
821 821
         // ourselves after getting the chain with -o.
822
-        file_put_contents($tmpDir . "/udp_login_test.conf", $theconfigs[0]);
822
+        file_put_contents($tmpDir."/udp_login_test.conf", $theconfigs[0]);
823 823
 
824 824
         $cmdline = $this->eapolTestConfig($probeindex, $opnameCheck, $frag);
825 825
         $this->loggerInstance->debug(4, "Shallow reachability check cmdline: $cmdline\n");
826
-        $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n" . $theconfigs[1] . "\n");
826
+        $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n".$theconfigs[1]."\n");
827 827
         $time_start = microtime(true);
828 828
         $pflow = [];
829 829
         exec($cmdline, $pflow);
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
         if ($packetflow[count($packetflow) - 1] == 3 && $this->checkLineparse($packetflow_orig, self::LINEPARSE_CHECK_REJECTIGNORE)) {
867 867
             array_pop($packetflow);
868 868
         }
869
-        $this->loggerInstance->debug(5, "Packetflow: " . print_r($packetflow, TRUE));
869
+        $this->loggerInstance->debug(5, "Packetflow: ".print_r($packetflow, TRUE));
870 870
         $packetcount = array_count_values($packetflow);
871 871
         $testresults['packetcount'] = $packetcount;
872 872
         $testresults['packetflow'] = $packetflow;
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
         
944 944
         $x509 = new \core\common\X509();
945 945
 // $eap_certarray holds all certs received in EAP conversation
946
-        $incomingData = file_get_contents($tmpDir . "/serverchain.pem");
946
+        $incomingData = file_get_contents($tmpDir."/serverchain.pem");
947 947
         if ($incomingData !== FALSE && strlen($incomingData) > 0) {
948 948
             $eapCertArray = $x509->splitCertificate($incomingData);
949 949
         } else {
@@ -973,10 +973,10 @@  discard block
 block discarded – undo
973 973
                 case RADIUSTests::SERVER_CA_SELFSIGNED:
974 974
                     $servercert[] = $cert;
975 975
                     if (count($servercert) == 1) {
976
-                        if (file_put_contents($tmpDir . "/incomingserver.pem", $cert['pem'] . "\n") === FALSE) {
976
+                        if (file_put_contents($tmpDir."/incomingserver.pem", $cert['pem']."\n") === FALSE) {
977 977
                             $this->loggerInstance->debug(4, "The (first) server certificate could not be written to $tmpDir/incomingserver.pem!\n");
978 978
                         }
979
-                        $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: " . print_r($servercert[0], true));
979
+                        $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: ".print_r($servercert[0], true));
980 980
                     } elseif (!in_array(RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS, $testresults['cert_oddities'])) {
981 981
                         $testresults['cert_oddities'][] = RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS;
982 982
                     }
@@ -1056,7 +1056,7 @@  discard block
 block discarded – undo
1056 1056
         chdir($tmpDir);
1057 1057
         $this->loggerInstance->debug(4, "temp dir: $tmpDir\n");
1058 1058
         if ($clientcertdata !== NULL) {
1059
-            file_put_contents($tmpDir . "/client.p12", $clientcertdata);
1059
+            file_put_contents($tmpDir."/client.p12", $clientcertdata);
1060 1060
         }
1061 1061
         $testresults = [];
1062 1062
         // initialise the sub-array for cleaner parsing
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
                     'issuer' => $this->printDN($certdata['issuer']),
1153 1153
                     'validFrom' => $this->printTm($certdata['validFrom_time_t']),
1154 1154
                     'validTo' => $this->printTm($certdata['validTo_time_t']),
1155
-                    'serialNumber' => $certdata['serialNumber'] . sprintf(" (0x%X)", $certdata['serialNumber']),
1155
+                    'serialNumber' => $certdata['serialNumber'].sprintf(" (0x%X)", $certdata['serialNumber']),
1156 1156
                     'sha1' => $certdata['sha1'],
1157 1157
                     'extensions' => $certdata['extensions']
1158 1158
                 ];
Please login to merge, or discard this patch.