@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | ?> |
62 | 62 | </h1> |
63 | 63 | <div class='infobox'> |
64 | - <h2><?php echo sprintf(_("%s Properties"),$uiElements->nomenclatureFed); ?></h2> |
|
64 | + <h2><?php echo sprintf(_("%s Properties"), $uiElements->nomenclatureFed); ?></h2> |
|
65 | 65 | <table> |
66 | 66 | <tr> |
67 | 67 | <td><?php echo _("Country:"); ?></td> |
@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | </table> |
73 | 73 | </div> |
74 | 74 | <?php |
75 | - echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld" . "' method='post' accept-charset='UTF-8'> |
|
76 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE'] . "'>"; |
|
75 | + echo "<form enctype='multipart/form-data' action='edit_federation_result.php?fed_id=$my_fed->tld"."' method='post' accept-charset='UTF-8'> |
|
76 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . CONFIG['MAX_UPLOAD_SIZE']."'>"; |
|
77 | 77 | ?> |
78 | 78 | <fieldset class="option_container"> |
79 | - <legend><strong><?php echo sprintf(_("%s Properties"),$uiElements->nomenclatureFed); ?></strong></legend> |
|
79 | + <legend><strong><?php echo sprintf(_("%s Properties"), $uiElements->nomenclatureFed); ?></strong></legend> |
|
80 | 80 | <?php |
81 | 81 | $optionDisplay = new \web\lib\admin\OptionDisplay($fed_options, "FED"); |
82 | 82 | echo $optionDisplay->prefilledOptionTable("fed"); |
@@ -84,5 +84,5 @@ discard block |
||
84 | 84 | <button type='button' class='newoption' onclick='getXML("fed")'><?php echo _("Add new option"); ?></button> |
85 | 85 | </fieldset> |
86 | 86 | <?php |
87 | - echo "<div><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_federation.php\"'>" . _("Discard changes") . "</button></div></form>"; |
|
87 | + echo "<div><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_federation.php\"'>"._("Discard changes")."</button></div></form>"; |
|
88 | 88 | echo $deco->footer(); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @author Stefan Winter <[email protected]> |
26 | 26 | */ |
27 | 27 | |
28 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
28 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
29 | 29 | |
30 | 30 | $auth = new \web\lib\admin\Authentication(); |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -40,18 +40,18 @@ discard block |
||
40 | 40 | $my_fed = $validator->Federation($_GET['fed_id'], $_SESSION['user']); |
41 | 41 | if (isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_SAVE) { // here we go |
42 | 42 | $fed_name = $my_fed->name; |
43 | - echo "<h1>" . sprintf(_("Submitted attributes for %s '%s'"), $uiElements->nomenclatureFed, $fed_name) . "</h1>"; |
|
43 | + echo "<h1>".sprintf(_("Submitted attributes for %s '%s'"), $uiElements->nomenclatureFed, $fed_name)."</h1>"; |
|
44 | 44 | echo "<table>"; |
45 | 45 | echo $optionParser->processSubmittedFields($my_fed, $_POST, $_FILES); |
46 | 46 | echo "</table>"; |
47 | 47 | |
48 | 48 | $loggerInstance = new \core\common\Logging(); |
49 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "FED " . $my_fed->name . " - attributes changed"); |
|
49 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "FED ".$my_fed->name." - attributes changed"); |
|
50 | 50 | |
51 | 51 | // re-instantiate ourselves... profiles need fresh data |
52 | 52 | |
53 | 53 | $my_fed = $validator->Federation($_GET['fed_id'], $_SESSION['user']); |
54 | 54 | |
55 | - echo "<br/><form method='post' action='overview_federation.php' accept-charset='UTF-8'><button type='submit'>" . _("Continue to dashboard") . "</button></form>"; |
|
55 | + echo "<br/><form method='post' action='overview_federation.php' accept-charset='UTF-8'><button type='submit'>"._("Continue to dashboard")."</button></form>"; |
|
56 | 56 | } |
57 | 57 | echo $deco->footer(); |
@@ -19,7 +19,7 @@ discard block |
||
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 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $profile = $my_profile; |
116 | 116 | } else { |
117 | 117 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
118 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created"); |
|
118 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
119 | 119 | } |
120 | 120 | } |
121 | 121 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $uiElements = new web\lib\admin\UIElements(); |
131 | 131 | // set realm info, if submitted |
132 | 132 | if ($realm !== FALSE) { |
133 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
133 | + $profile->setRealm($anonLocal."@".$realm); |
|
134 | 134 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
135 | 135 | } else { |
136 | 136 | $profile->setRealm(""); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
154 | 154 | } else { |
155 | 155 | $profile->setRealmcheckUser(true, $checkuser_name); |
156 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
156 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
157 | 157 | } |
158 | 158 | } else { |
159 | 159 | $profile->setRealmCheckUser(false); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } else { |
167 | 167 | $profile->setInputVerificationPreference($verify, $hint); |
168 | 168 | if ($hint !== FALSE) { |
169 | - $extratext = " " . sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
169 | + $extratext = " ".sprintf(_("and the input field will be prefilled with '<strong>@%s</strong>'."), $realm); |
|
170 | 170 | } else { |
171 | 171 | $extratext = "."; |
172 | 172 | } |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
204 | 204 | } |
205 | 205 | |
206 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
206 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
207 | 207 | |
208 | 208 | // re-instantiate $profile, we need to do completion checks and need fresh data for isEapTypeDefinitionComplete() |
209 | 209 | |
@@ -216,23 +216,23 @@ discard block |
||
216 | 216 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
217 | 217 | continue; |
218 | 218 | } |
219 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
220 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
219 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
220 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
221 | 221 | // add EAP type to profile as requested, but ... |
222 | 222 | $profile->addSupportedEapMethod($a, $priority); |
223 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - supported EAP types changed"); |
|
223 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - supported EAP types changed"); |
|
224 | 224 | // see if we can enable the EAP type, or if info is missing |
225 | 225 | $eapcompleteness = $profile->isEapTypeDefinitionComplete($a); |
226 | 226 | if ($eapcompleteness === true) { |
227 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>"); |
|
227 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>"); |
|
228 | 228 | } else { |
229 | 229 | $warntext = ""; |
230 | 230 | if (is_array($eapcompleteness)) { |
231 | 231 | foreach ($eapcompleteness as $item) { |
232 | - $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> "; |
|
232 | + $warntext .= "<strong>".$uiElements->displayName($item)."</strong> "; |
|
233 | 233 | } |
234 | 234 | } |
235 | - echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
235 | + echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
236 | 236 | } |
237 | 237 | } |
238 | 238 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | <?php |
249 | 249 | if (count($reloadedProfile->getEapMethodsinOrderOfPreference(1)) > 0) { |
250 | 250 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfile->identifier' accept-charset='UTF-8'> |
251 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
251 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
252 | 252 | </form>"; |
253 | 253 | } |
254 | 254 | echo $deco->footer(); |
@@ -19,7 +19,7 @@ discard block |
||
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 | $uiElements = new web\lib\admin\UIElements(); |
25 | 25 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | // filesystem cleanup |
73 | 73 | case web\lib\common\FormElements::BUTTON_DELETE: |
74 | 74 | $i = web\lib\admin\Maintenance::deleteObsoleteTempDirs(); |
75 | - echo "<div class='ca-summary'><table>" . $uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted") . "</table></div>"; |
|
75 | + echo "<div class='ca-summary'><table>".$uiElements->boxRemark(sprintf("Deleted %d cache directories.", $i), "Cache deleted")."</table></div>"; |
|
76 | 76 | break; |
77 | 77 | default: |
78 | 78 | break; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $admin_query = $dbHandle->exec("SELECT SUM(downloads_admin) AS admin, SUM(downloads_user) AS user, SUM(downloads_silverbullet) as silverbullet FROM downloads WHERE device_id = '$index'"); |
139 | 139 | // SELECT -> mysqli_result, not boolean |
140 | 140 | while ($a = mysqli_fetch_object(/** @scrutinizer ignore-type */ $admin_query)) { |
141 | - echo "<td>" . $device_array['display'] . "</td><td>" . $a->admin . "</td><td>" . $a->user . "</td><td>" . $a->silverbullet . "</td><td>" . sprintf("%s", $a->user + $a->silverbullet) . "</td>"; |
|
141 | + echo "<td>".$device_array['display']."</td><td>".$a->admin."</td><td>".$a->user."</td><td>".$a->silverbullet."</td><td>".sprintf("%s", $a->user + $a->silverbullet)."</td>"; |
|
142 | 142 | $gross_admin = $gross_admin + $a->admin; |
143 | 143 | $gross_user = $gross_user + $a->user; |
144 | 144 | $gross_silverbullet = $gross_silverbullet + $a->silverbullet; |
@@ -19,7 +19,7 @@ discard block |
||
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 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | $user = new \core\User($_SESSION['user']); |
31 | 31 | if (!isset($_POST['submitbutton']) || $_POST['submitbutton'] != web\lib\common\FormElements::BUTTON_SAVE) { // what are we supposed to do? |
32 | - echo "<p>" . _("The page was called with insufficient data. Please report this as an error.") . "</p>"; |
|
32 | + echo "<p>"._("The page was called with insufficient data. Please report this as an error.")."</p>"; |
|
33 | 33 | echo $deco->footer(); |
34 | 34 | exit(0); |
35 | 35 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | if (isset($_POST['option'])) { |
47 | 47 | foreach ($_POST['option'] as $opt_id => $optname) { |
48 | 48 | if ($optname == "user:fedadmin") { |
49 | - echo "Security violation: user tried to make himself " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation'] . " administrator!"; |
|
49 | + echo "Security violation: user tried to make himself ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']." administrator!"; |
|
50 | 50 | exit(1); |
51 | 51 | } |
52 | 52 | } |
@@ -19,7 +19,7 @@ discard block |
||
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 | $therealm = filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING); |
25 | 25 | $thevisited = filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | $validator = new \web\lib\common\InputValidation(); |
36 | 36 | |
37 | 37 | echo "<pre>"; |
38 | - echo "Testing " . $validatedRealm . " in " . $validator->string($thevisited); |
|
38 | + echo "Testing ".$validatedRealm." in ".$validator->string($thevisited); |
|
39 | 39 | print_r($telepath->magic()); |
40 | 40 | echo "</pre>"; |
41 | 41 | } |
42 | 42 | \ No newline at end of file |
@@ -19,7 +19,7 @@ discard block |
||
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 | CAT_session_start(); |
24 | 24 | $loggerInstance = new \core\common\Logging(); |
25 | 25 | $loggerInstance->debug(4, "Sociopath test\n"); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | return NULL; |
34 | 34 | } |
35 | 35 | $loggerInstance->debug(4, $_SESSION['EVIDENCE']['QUESTIONSASKED']); |
36 | - $loggerInstance->debug(4, "\nAnswer question " . $QNUM . "\n"); |
|
36 | + $loggerInstance->debug(4, "\nAnswer question ".$QNUM."\n"); |
|
37 | 37 | switch ($answer) { |
38 | 38 | case 1: |
39 | 39 | $loggerInstance->debug(4, "Revaluate with FALSE"); |
@@ -19,7 +19,7 @@ |
||
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 | $sociopath = new \core\diag\Sociopath(); |
25 | 25 |
@@ -19,7 +19,7 @@ discard block |
||
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 | |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | $testsuite = new \core\diag\RADIUSTests($check_realm, $my_profile->getRealmCheckOuterUsername(), $my_profile->getEapMethodsinOrderOfPreference(1), $my_profile->getCollapsedAttributes()['eap:server_name'], $my_profile->getCollapsedAttributes()["eap:ca_file"]); |
56 | 56 | $rfc7585suite = new \core\diag\RFC7585Tests($check_realm); |
57 | 57 | } else { |
58 | - $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>"; |
|
58 | + $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>"; |
|
59 | 59 | } |
60 | 60 | } else { // someone else's realm... only shallow checks |
61 | 61 | $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? ""); |
62 | 62 | if ($check_realm !== FALSE) { |
63 | 63 | $_SESSION['check_realm'] = $check_realm; |
64 | - $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm); |
|
64 | + $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm); |
|
65 | 65 | $rfc7585suite = new \core\diag\RFC7585Tests($check_realm); |
66 | 66 | } else { |
67 | 67 | $error_message = _("No valid realm name given, cannot execute any checks!"); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>"; |
110 | 110 | var getitfrom = "<?php echo _("Get it from here.") ?>"; |
111 | 111 | var listsource = "<?php echo CONFIG_DIAGNOSTICS['RADIUSTESTS']['accreditedCAsURL'] ?>"; |
112 | - var moretext = "<?php echo _("more") . "»" ?>"; |
|
112 | + var moretext = "<?php echo _("more")."»" ?>"; |
|
113 | 113 | var lesstext = "<?php echo "«" ?>"; |
114 | 114 | var morealltext = "<?php echo _("Show detailed information for all tests") ?>"; |
115 | 115 | var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>"; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | } |
246 | 246 | } |
247 | 247 | cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state; |
248 | - cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ") . ")"; ?>' + add + '</td></tr>'; |
|
248 | + cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ").")"; ?>' + add + '</td></tr>'; |
|
249 | 249 | cliinfo = cliinfo + '</tbody></table></ul></li>'; |
250 | 250 | if (data.ca[key].certificate[c].finalerror === 1) { |
251 | 251 | cliinfo = cliinfo + '<li>' + restskipped + '</li>'; |
@@ -413,8 +413,8 @@ discard block |
||
413 | 413 | <?php |
414 | 414 | foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) { |
415 | 415 | print " |
416 | -$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading); |
|
417 | -$(\"#live_src" . $hostindex . "_img\").show(); |
|
416 | +$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading); |
|
417 | +$(\"#live_src" . $hostindex."_img\").show(); |
|
418 | 418 | $.ajax({ |
419 | 419 | url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm, |
420 | 420 | type: 'POST', |
@@ -444,15 +444,15 @@ discard block |
||
444 | 444 | <?php |
445 | 445 | foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) { |
446 | 446 | if ($my_profile !== NULL) { |
447 | - $extraarg = "profile_id: " . $my_profile->identifier . ", "; |
|
447 | + $extraarg = "profile_id: ".$my_profile->identifier.", "; |
|
448 | 448 | } else { |
449 | 449 | $extraarg = ""; |
450 | 450 | } |
451 | 451 | print " |
452 | -$(\"#src" . $hostindex . "_img\").attr('src',icon_loading); |
|
452 | +$(\"#src" . $hostindex."_img\").attr('src',icon_loading); |
|
453 | 453 | $(\"#src$hostindex\").html(''); |
454 | 454 | running_ajax_stat++; |
455 | -$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->langObject->getLang() . "', hostindex: '$hostindex' }, udp, 'json'); |
|
455 | +$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->langObject->getLang()."', hostindex: '$hostindex' }, udp, 'json'); |
|
456 | 456 | |
457 | 457 | "; |
458 | 458 | } |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | if ($check_realm === FALSE) { |
480 | 480 | print "<p>$error_message</p>"; |
481 | 481 | } else { |
482 | - print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n"; |
|
482 | + print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n"; |
|
483 | 483 | ?> |
484 | 484 | <div id="debug_out" style="display: none"></div> |
485 | 485 | <div id="tabs" style="min-width: 600px; max-width:800px"> |
@@ -496,12 +496,12 @@ discard block |
||
496 | 496 | </legend> |
497 | 497 | <?php |
498 | 498 | // NAPTR existence check |
499 | - echo "<strong>" . _("DNS chekcs") . "</strong><div>"; |
|
499 | + echo "<strong>"._("DNS chekcs")."</strong><div>"; |
|
500 | 500 | $naptr = $rfc7585suite->relevantNAPTR(); |
501 | 501 | if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
502 | 502 | echo "<table>"; |
503 | 503 | // output in friendly words |
504 | - echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
504 | + echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
505 | 505 | switch ($naptr) { |
506 | 506 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
507 | 507 | echo _("This realm has no NAPTR records."); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | |
517 | 517 | // compliance checks for NAPTRs |
518 | 518 | if ($naptr > 0) { |
519 | - echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
519 | + echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
520 | 520 | $naptr_valid = $rfc7585suite->relevantNAPTRcompliance(); |
521 | 521 | switch ($naptr_valid) { |
522 | 522 | case \core\diag\RADIUSTests::RETVAL_OK: |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | |
534 | 534 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) { |
535 | 535 | $srv = $rfc7585suite->relevantNAPTRsrvResolution(); |
536 | - echo "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
536 | + echo "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
537 | 537 | switch ($srv) { |
538 | 538 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
539 | 539 | echo _("This check was skipped."); |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | // IP addresses for the hosts |
550 | 550 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) { |
551 | 551 | $hosts = $rfc7585suite->relevantNAPTRhostnameResolution(); |
552 | - echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
552 | + echo "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
553 | 553 | switch ($srv) { |
554 | 554 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
555 | 555 | echo _("This check was skipped."); |
@@ -565,12 +565,12 @@ discard block |
||
565 | 565 | |
566 | 566 | echo "</table><br/><br/>"; |
567 | 567 | if (count($testsuite->listerrors()) == 0) { |
568 | - echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!"); |
|
568 | + echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!"); |
|
569 | 569 | } else { |
570 | - 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."); |
|
570 | + 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."); |
|
571 | 571 | echo "<div class='notacceptable'><table>"; |
572 | 572 | foreach ($testsuite->listerrors() as $details) { |
573 | - echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
573 | + echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
|
574 | 574 | } |
575 | 575 | echo "</table></div>"; |
576 | 576 | } |
@@ -586,25 +586,25 @@ discard block |
||
586 | 586 | $("#dynamic_tests").show(); |
587 | 587 | '; |
588 | 588 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
589 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
589 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
590 | 590 | print " |
591 | 591 | running_ajax_dyn++; |
592 | - $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->langObject->getLang() . "', hostindex: '$hostindex' }, error: eee, success: capath, dataType: 'json'}); |
|
592 | + $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->langObject->getLang()."', hostindex: '$hostindex' }, error: eee, success: capath, dataType: 'json'}); |
|
593 | 593 | running_ajax_dyn++; |
594 | - $.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'}); |
|
594 | + $.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'}); |
|
595 | 595 | "; |
596 | 596 | } |
597 | 597 | echo "} |
598 | 598 | </script><hr>"; |
599 | 599 | } else { |
600 | - echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
600 | + echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
|
601 | 601 | } |
602 | - echo "<strong>" . _("Static connectivity tests") . "</strong> |
|
602 | + echo "<strong>"._("Static connectivity tests")."</strong> |
|
603 | 603 | <table><tr> |
604 | 604 | <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'> </td> |
605 | 605 | </tr></table>"; |
606 | 606 | if ($naptr > 0) { |
607 | - echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
607 | + echo "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
608 | 608 | <table><tr> |
609 | 609 | <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'> </td> |
610 | 610 | </tr></table>"; |
@@ -624,12 +624,12 @@ discard block |
||
624 | 624 | print "<p>"; |
625 | 625 | foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) { |
626 | 626 | print "<hr>"; |
627 | - printf(_("Testing from: %s"), "<strong>" . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
627 | + printf(_("Testing from: %s"), "<strong>".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
628 | 628 | print "<table id='results$hostindex' style='width:100%' class='udp_results'> |
629 | 629 | <tr> |
630 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td> |
|
630 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td> |
|
631 | 631 | <td id='src$hostindex' colspan=2> |
632 | -" . _("testing...") . " |
|
632 | +"._("testing...")." |
|
633 | 633 | </td> |
634 | 634 | </tr> |
635 | 635 | </table>"; |
@@ -648,21 +648,21 @@ discard block |
||
648 | 648 | |
649 | 649 | <?php |
650 | 650 | echo "<div id='dynamic_tests'><fieldset class='option_container'> |
651 | - <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
|
651 | + <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>"; |
|
652 | 652 | |
653 | 653 | $resultstoprint = []; |
654 | 654 | if (count($rfc7585suite->NAPTR_hostname_records) > 0) { |
655 | - $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>'; |
|
656 | - $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
655 | + $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>'; |
|
656 | + $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
657 | 657 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
658 | - $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]); |
|
659 | - $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>'; |
|
658 | + $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]); |
|
659 | + $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>'; |
|
660 | 660 | $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
661 | 661 | $resultstoprint[] = "<table id='caresults$hostindex' style='width:100%'> |
662 | 662 | <tr> |
663 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td> |
|
663 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td> |
|
664 | 664 | <td id='srcca$hostindex'> |
665 | -" . _("testing...") . " |
|
665 | +"._("testing...")." |
|
666 | 666 | </td> |
667 | 667 | </tr> |
668 | 668 | </table>"; |
@@ -670,12 +670,12 @@ discard block |
||
670 | 670 | } |
671 | 671 | $clientstest = []; |
672 | 672 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
673 | - $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
|
673 | + $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>'; |
|
674 | 674 | $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'> |
675 | 675 | <tr> |
676 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td> |
|
676 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td> |
|
677 | 677 | <td id='srcclient$hostindex'> |
678 | -" . _("testing...") . " |
|
678 | +"._("testing...")." |
|
679 | 679 | </td> |
680 | 680 | </tr> |
681 | 681 | </table></span>"; |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | } |
684 | 684 | echo '<div style="align:right;">'; |
685 | 685 | echo join('', $resultstoprint); |
686 | - 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>'; |
|
686 | + 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>'; |
|
687 | 687 | print join('', $clientstest); |
688 | 688 | echo '</span>'; |
689 | 689 | echo '</div>'; |
@@ -697,7 +697,7 @@ discard block |
||
697 | 697 | // check if truncates/dies on Operator-Name |
698 | 698 | if ($my_profile !== NULL) { |
699 | 699 | echo "<div id='tabs-4'><fieldset class='option_container'> |
700 | - <legend><strong>" . _("Live login test") . "</strong></legend>"; |
|
700 | + <legend><strong>" . _("Live login test")."</strong></legend>"; |
|
701 | 701 | $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1); |
702 | 702 | if (count($prof_compl) > 0) { |
703 | 703 | $passwordReqired = FALSE; |
@@ -710,34 +710,34 @@ discard block |
||
710 | 710 | $clientCertRequired = TRUE; |
711 | 711 | } |
712 | 712 | } |
713 | - 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> |
|
714 | - <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> |
|
715 | - <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> |
|
713 | + 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> |
|
714 | + <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> |
|
715 | + <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> |
|
716 | 716 | <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'> |
717 | 717 | <input type='hidden' name='test_type' value='udp_login'> |
718 | - <input type='hidden' name='lang' value='" . $gui->langObject->getLang() . "'> |
|
719 | - <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'> |
|
718 | + <input type='hidden' name='lang' value='" . $gui->langObject->getLang()."'> |
|
719 | + <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'> |
|
720 | 720 | <table id='live_tests'>"; |
721 | 721 | // if any password based EAP methods are available enable this section |
722 | 722 | if ($passwordReqired) { |
723 | - echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr> |
|
724 | - <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
725 | - echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
726 | - echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
723 | + echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr> |
|
724 | + <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
725 | + echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
726 | + echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
727 | 727 | } |
728 | 728 | // ask for cert + privkey if TLS-based method is active |
729 | 729 | if ($clientCertRequired) { |
730 | - echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr> |
|
731 | - <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
732 | - <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
733 | - <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
730 | + echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr> |
|
731 | + <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
732 | + <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
733 | + <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
734 | 734 | } |
735 | - echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>"; |
|
735 | + echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>"; |
|
736 | 736 | echo "<div id='live_login_results' style='display:none'>"; |
737 | 737 | foreach (CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'] as $hostindex => $host) { |
738 | 738 | print "<hr>"; |
739 | - printf(_("Testing from: %s"), "<strong>" . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
740 | - 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>"; |
|
739 | + printf(_("Testing from: %s"), "<strong>".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
740 | + 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>"; |
|
741 | 741 | print "<div id='eap_test$hostindex' class='eap_test_results'></div>"; |
742 | 742 | } |
743 | 743 | echo "</div>"; |
@@ -754,7 +754,7 @@ discard block |
||
754 | 754 | if (isset($_POST['comefrom'])) { |
755 | 755 | $return = htmlspecialchars_decode($_POST['comefrom'])."?inst_id=".$my_inst->identifier; |
756 | 756 | echo "<form method='post' action='$return' accept-charset='UTF-8'> |
757 | - <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>" |
|
757 | + <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>" |
|
758 | 758 | . "</form>"; |
759 | 759 | } |
760 | 760 | if ($check_realm !== FALSE) { |