Passed
Push — release_2_0 ( b0c573...4fb011 )
by Stefan
11:13
created
web/diag/radius_tests.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php";
22
+require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php";
23 23
 
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 $validator = new \web\lib\common\InputValidation();
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
  */
44 44
 function disp_name($eap) {
45 45
     $displayName = \core\common\EAP::eapDisplayName($eap);
46
-    return $displayName['OUTER'] . ( $displayName['INNER'] != '' ? '-' . $displayName['INNER'] : '');
46
+    return $displayName['OUTER'].($displayName['INNER'] != '' ? '-'.$displayName['INNER'] : '');
47 47
 }
48 48
 
49 49
 if (!isset($_REQUEST['test_type']) || !$_REQUEST['test_type']) {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     // contains port number; needs to be redacted for filter_var to work
84 84
     // in any case, it's a printable string, so filter it initially
85 85
     
86
-    $filteredHost = filter_input(INPUT_GET,'src', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST,'src', FILTER_SANITIZE_STRING);
86
+    $filteredHost = filter_input(INPUT_GET, 'src', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'src', FILTER_SANITIZE_STRING);
87 87
     $hostonly1 = preg_replace('/:[0-9]*$/', "", $filteredHost);
88 88
     $hostonly2 = preg_replace('/^\[/', "", $hostonly1);
89 89
     $hostonly3 = preg_replace('/\]$/', "", $hostonly2);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     }
95 95
     // host IP address testing passed. So let's take our port number back
96 96
     $host = $filteredHost;
97
-    $expectedName = filter_input(INPUT_GET,'expectedname', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST,'expectedname', FILTER_SANITIZE_STRING);
97
+    $expectedName = filter_input(INPUT_GET, 'expectedname', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'expectedname', FILTER_SANITIZE_STRING);
98 98
 }
99 99
 
100 100
 $returnarray = [];
@@ -157,10 +157,10 @@  discard block
 block discarded – undo
157 157
                             break;
158 158
                         case \core\common\Entity::L_REMARK:
159 159
                         case \core\common\Entity::L_WARN:
160
-                            $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level];
160
+                            $message = _("<strong>Test partially successful</strong>: authentication succeded.").' '.$additional_message[$level];
161 161
                             break;
162 162
                         case \core\common\Entity::L_ERROR:
163
-                            $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level];
163
+                            $message = _("<strong>Test FAILED</strong>: authentication succeded.").' '.$additional_message[$level];
164 164
                             break;
165 165
                     }
166 166
                     break;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             case \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT:
212 212
                 $level = $returnarray['result'][$i]['level'];
213 213
                 if ($level > \core\common\Entity::L_OK) {
214
-                    $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.") . ' ' . $additional_message[$level];
214
+                    $message = _("<strong>Test partially successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.").' '.$additional_message[$level];
215 215
                 } else {
216 216
                     $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned.");
217 217
                 }
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                 $level = \core\common\Entity::L_ERROR;
235 235
                 break;
236 236
         }
237
-        $loggerInstance->debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n");
237
+        $loggerInstance->debug(4, "SERVER=".$returnarray['result'][$i]['server']."\n");
238 238
         $returnarray['result'][$i]['level'] = $level;
239 239
         $returnarray['result'][$i]['message'] = $message;
240 240
         break;
@@ -248,16 +248,16 @@  discard block
 block discarded – undo
248 248
         if (isset($rfc6614suite->TLS_CA_checks_result[$host])) {
249 249
             $returnarray['time_millisec'] = sprintf("%d", $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']);
250 250
             if (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA)) {
251
-                $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!") . ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
251
+                $returnarray['message'] = _("<strong>ERROR</strong>: the server presented a certificate which is from an unknown authority!").' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
252 252
                 $returnarray['level'] = \core\common\Entity::L_ERROR;
253
-            } elseif (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH)){
254
-                $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!") . ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
253
+            } elseif (isset($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity']) && ($rfc6614suite->TLS_CA_checks_result[$host]['cert_oddity'] == \core\diag\RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH)) {
254
+                $returnarray['message'] = _("<strong>WARNING</strong>: the server name as discovered in the SRV record does not match any name in the server certificate!").' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
255 255
                 $returnarray['level'] = \core\common\Entity::L_WARN;                
256 256
             } else {
257 257
                 $returnarray['message'] = $rfc6614suite->returnCodes[$rfc6614suite->TLS_CA_checks_result[$host]['status']]["message"];
258 258
                 $returnarray['level'] = \core\common\Entity::L_OK;
259 259
                 if ($rfc6614suite->TLS_CA_checks_result[$host]['status'] != \core\diag\RADIUSTests::RETVAL_CONNECTION_REFUSED) {
260
-                    $returnarray['message'] .= ' (' . sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']) . '&nbsp;ms)';
260
+                    $returnarray['message'] .= ' ('.sprintf(_("elapsed time: %d"), $rfc6614suite->TLS_CA_checks_result[$host]['time_millisec']).'&nbsp;ms)';
261 261
                 } else {
262 262
                     $returnarray['level'] = \core\common\Entity::L_ERROR;
263 263
                 }
Please login to merge, or discard this patch.
web/diag/action_realmcheck.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
         $testsuite = new \core\diag\RADIUSTests($check_realm, $testedProfile->getRealmCheckOuterUsername(), $testedProfile->getEapMethodsinOrderOfPreference(1), $testedProfile->getCollapsedAttributes()['eap:server_name'], $testedProfile->getCollapsedAttributes()["eap:ca_file"]);
66 66
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
67 67
     } else {
68
-        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>";
68
+        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>";
69 69
     }
70 70
 } else { // someone else's realm, and we don't know anything about it... only shallow checks
71 71
     $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? "");
72 72
     if ($check_realm !== FALSE) {
73 73
         $_SESSION['check_realm'] = $check_realm;
74
-        $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
74
+        $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
75 75
         $rfc7585suite = new \core\diag\RFC7585Tests($check_realm);
76 76
     } else {
77 77
         $error_message = _("No valid realm name given, cannot execute any checks!");
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>";
120 120
     var getitfrom = "<?php echo _("Get it from here.") ?>";
121 121
     var listsource = "<?php echo CONFIG_DIAGNOSTICS['RADIUSTESTS']['accreditedCAsURL'] ?>";
122
-    var moretext = "<?php echo _("more") . "&raquo;" ?>";
122
+    var moretext = "<?php echo _("more")."&raquo;" ?>";
123 123
     var lesstext = "<?php echo "&laquo" ?>";
124 124
     var morealltext = "<?php echo _("Show detailed information for all tests") ?>";
125 125
     var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>";
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
                         }
257 257
                     }
258 258
                     cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state;
259
-                    cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;") . ")"; ?>' + add + '</td></tr>';
259
+                    cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;").")"; ?>' + add + '</td></tr>';
260 260
                     cliinfo = cliinfo + '</tbody></table></ul></li>';
261 261
                     if (data.ca[key].certificate[c].finalerror === 1) {
262 262
                         cliinfo = cliinfo + '<li>' + restskipped + '</li>';
@@ -426,8 +426,8 @@  discard block
 block discarded – undo
426 426
 <?php
427 427
 foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) {
428 428
     print "
429
-$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading);
430
-$(\"#live_src" . $hostindex . "_img\").show();
429
+$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading);
430
+$(\"#live_src" . $hostindex."_img\").show();
431 431
 $.ajax({
432 432
     url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm,
433 433
     type: 'POST',
@@ -457,15 +457,15 @@  discard block
 block discarded – undo
457 457
 <?php
458 458
 foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) {
459 459
     if ($testedProfile !== NULL) {
460
-        $extraarg = "profile_id: " . $testedProfile->identifier . ", ";
460
+        $extraarg = "profile_id: ".$testedProfile->identifier.", ";
461 461
     } else {
462 462
         $extraarg = "";
463 463
     }
464 464
     print "
465
-$(\"#src" . $hostindex . "_img\").attr('src',icon_loading);
465
+$(\"#src" . $hostindex."_img\").attr('src',icon_loading);
466 466
 $(\"#src$hostindex\").html('');
467 467
 running_ajax_stat++;
468
-$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->langObject->getLang() . "', hostindex: '$hostindex'  }, udp, 'json');
468
+$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->langObject->getLang()."', hostindex: '$hostindex'  }, udp, 'json');
469 469
 
470 470
 ";
471 471
 }
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
     if ($check_realm === FALSE) {
493 493
         print "<p>$error_message</p>";
494 494
     } else {
495
-        print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n";
495
+        print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n";
496 496
         ?>
497 497
         <div id="debug_out" style="display: none"></div>
498 498
         <div id="tabs" style="min-width: 600px; max-width:800px">
@@ -509,12 +509,12 @@  discard block
 block discarded – undo
509 509
                     </legend>
510 510
                     <?php
511 511
                     // NAPTR existence check
512
-                    echo "<strong>" . _("DNS chekcs") . "</strong><div>";
512
+                    echo "<strong>"._("DNS chekcs")."</strong><div>";
513 513
                     $naptr = $rfc7585suite->relevantNAPTR();
514 514
                     if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
515 515
                         echo "<table>";
516 516
                         // output in friendly words
517
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
517
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
518 518
                         switch ($naptr) {
519 519
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
520 520
                                 echo _("This realm has no NAPTR records.");
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 
530 530
                         // compliance checks for NAPTRs
531 531
                         if ($naptr > 0) {
532
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
532
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
533 533
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
534 534
                             switch ($naptr_valid) {
535 535
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 
547 547
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
548 548
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
549
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
549
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
550 550
                             switch ($srv) {
551 551
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
552 552
                                     echo _("This check was skipped.");
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
                         // IP addresses for the hosts
563 563
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
564 564
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
565
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
565
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
566 566
                             switch ($srv) {
567 567
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
568 568
                                     echo _("This check was skipped.");
@@ -578,12 +578,12 @@  discard block
 block discarded – undo
578 578
 
579 579
                         echo "</table><br/><br/>";
580 580
                         if (count($testsuite->listerrors()) == 0) {
581
-                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
581
+                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
582 582
                         } else {
583
-                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
583
+                            echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
584 584
                             echo "<div class='notacceptable'><table>";
585 585
                             foreach ($testsuite->listerrors() as $details) {
586
-                                echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
586
+                                echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
587 587
                             }
588 588
                             echo "</table></div>";
589 589
                         }
@@ -599,26 +599,26 @@  discard block
 block discarded – undo
599 599
                  $("#dynamic_tests").show();
600 600
               ';
601 601
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
602
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
602
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
603 603
                             $expectedName = $addr['hostname'];
604 604
                             print "
605 605
                             running_ajax_dyn++;
606
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->langObject->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
606
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->langObject->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
607 607
                             running_ajax_dyn++;
608
-                            $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '" . $gui->langObject->getLang() . "', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
608
+                            $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '".$gui->langObject->getLang()."', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
609 609
                        ";
610 610
                         }
611 611
                         echo "}
612 612
               </script><hr>";
613 613
                     } else {
614
-                        echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
614
+                        echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
615 615
                     }
616
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
616
+                    echo "<strong>"._("Static connectivity tests")."</strong>
617 617
          <table><tr>
618 618
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_static_ico' class='icon'></td><td id='main_static_result' style='display:none'>&nbsp;</td>
619 619
          </tr></table>";
620 620
                     if ($naptr > 0) {
621
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
621
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
622 622
          <table><tr>
623 623
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result' style='display:none'>&nbsp;</td>
624 624
          </tr></table>";
@@ -638,12 +638,12 @@  discard block
 block discarded – undo
638 638
                     print "<p>";
639 639
                     foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) {
640 640
                         print "<hr>";
641
-                        printf(_("Testing from: %s"), "<strong>" . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
641
+                        printf(_("Testing from: %s"), "<strong>".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name']."</strong>");
642 642
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
643 643
 <tr>
644
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
644
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
645 645
 <td id='src$hostindex' colspan=2>
646
-" . _("testing...") . "
646
+"._("testing...")."
647 647
 </td>
648 648
 </tr>
649 649
 </table>";
@@ -662,21 +662,21 @@  discard block
 block discarded – undo
662 662
 
663 663
                     <?php
664 664
                     echo "<div id='dynamic_tests'><fieldset class='option_container'>
665
-                <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>";
665
+                <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>";
666 666
 
667 667
                     $resultstoprint = [];
668 668
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
669
-                        $resultstoprint[] = '<table style="align:right; display: none;" id="dynamic_result_fail">' . _("Some errors were found during the tests, see below") . '</table><table style="align:right; display: none;" id="dynamic_result_pass">' . _("All tests passed, congratulations!") . '</table>';
670
-                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
669
+                        $resultstoprint[] = '<table style="align:right; display: none;" id="dynamic_result_fail">'._("Some errors were found during the tests, see below").'</table><table style="align:right; display: none;" id="dynamic_result_pass">'._("All tests passed, congratulations!").'</table>';
670
+                        $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
671 671
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
672
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
673
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
672
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
673
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
674 674
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
675 675
                             $resultstoprint[] = "<table id='caresults$hostindex'  style='width:100%'>
676 676
 <tr>
677
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td>
677
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td>
678 678
 <td id='srcca$hostindex'>
679
-" . _("testing...") . "
679
+"._("testing...")."
680 680
 </td>
681 681
 </tr>
682 682
 </table>";
@@ -684,12 +684,12 @@  discard block
 block discarded – undo
684 684
                         }
685 685
                         $clientstest = [];
686 686
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
687
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
687
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
688 688
                             $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'>
689 689
 <tr>
690
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td>
690
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td>
691 691
 <td id='srcclient$hostindex'>
692
-" . _("testing...") . "
692
+"._("testing...")."
693 693
 </td>
694 694
 </tr>
695 695
 </table></span>";
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
                         }
698 698
                         echo '<div style="align:right;">';
699 699
                         echo join('', $resultstoprint);
700
-                        echo '<span id="clientstest" style="display: none;"><p><hr><b>' . _('Checking if certificates from  CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>';
700
+                        echo '<span id="clientstest" style="display: none;"><p><hr><b>'._('Checking if certificates from  CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>';
701 701
                         print join('', $clientstest);
702 702
                         echo '</span>';
703 703
                         echo '</div>';
@@ -711,7 +711,7 @@  discard block
 block discarded – undo
711 711
                 //     check if truncates/dies on Operator-Name
712 712
                 if ($my_profile !== NULL) {
713 713
                     echo "<div id='tabs-4'><fieldset class='option_container'>
714
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
714
+                <legend><strong>" . _("Live login test")."</strong></legend>";
715 715
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
716 716
                     if (count($prof_compl) > 0) {
717 717
                         $passwordReqired = FALSE;
@@ -724,34 +724,34 @@  discard block
 block discarded – undo
724 724
                                 $clientCertRequired = TRUE;
725 725
                             }
726 726
                         }
727
-                        echo "<div id='disposable_credential_container'><p>" . _("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.") . "</p>
728
-                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.") . "</p>
729
-                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!") . "</p></div>
727
+                        echo "<div id='disposable_credential_container'><p>"._("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.")."</p>
728
+                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.")."</p>
729
+                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!")."</p></div>
730 730
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
731 731
                     <input type='hidden' name='test_type' value='udp_login'>
732
-                    <input type='hidden' name='lang' value='" . $gui->langObject->getLang() . "'>
733
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
732
+                    <input type='hidden' name='lang' value='" . $gui->langObject->getLang()."'>
733
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
734 734
                     <table id='live_tests'>";
735 735
 // if any password based EAP methods are available enable this section
736 736
                         if ($passwordReqired) {
737
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
738
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
739
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
740
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
737
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
738
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
739
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
740
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
741 741
                         }
742 742
                         // ask for cert + privkey if TLS-based method is active
743 743
                         if ($clientCertRequired) {
744
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
745
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
746
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
747
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
744
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
745
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
746
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
747
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
748 748
                         }
749
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
749
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
750 750
                         echo "<div id='live_login_results' style='display:none'>";
751 751
                         foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) {
752 752
                             print "<hr>";
753
-                            printf(_("Testing from: %s"), "<strong>" . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
754
-                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src" . $hostindex . "_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>";
753
+                            printf(_("Testing from: %s"), "<strong>".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name']."</strong>");
754
+                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src".$hostindex."_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>";
755 755
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
756 756
                         }
757 757
                         echo "</div>";
@@ -766,9 +766,9 @@  discard block
 block discarded – undo
766 766
             }
767 767
 
768 768
             if (isset($_POST['comefrom'])) {
769
-                $return = htmlspecialchars_decode($_POST['comefrom']) . "?inst_id=" . $my_inst->identifier;
769
+                $return = htmlspecialchars_decode($_POST['comefrom'])."?inst_id=".$my_inst->identifier;
770 770
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
771
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>"
771
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>"
772 772
                 . "</form>";
773 773
             }
774 774
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.