@@ -137,10 +137,10 @@ discard block |
||
| 137 | 137 | <?php |
| 138 | 138 | if ($wizard_style) { |
| 139 | 139 | echo "<p>" . |
| 140 | - sprintf(_("In this section, you define on which media %s should be configured on user devices."),Config::$CONSORTIUM['name']) . "</p> |
|
| 140 | + sprintf(_("In this section, you define on which media %s should be configured on user devices."), Config::$CONSORTIUM['name']) . "</p> |
|
| 141 | 141 | <ul>"; |
| 142 | 142 | echo "<li>"; |
| 143 | - echo "<strong>" . ( count(Config::$CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
|
| 143 | + echo "<strong>" . (count(Config::$CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
|
| 144 | 144 | if (count(Config::$CONSORTIUM['ssid']) > 0) { |
| 145 | 145 | $ssidlist = ""; |
| 146 | 146 | foreach (Config::$CONSORTIUM['ssid'] as $ssid) |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | echo "</li>"; |
| 158 | 158 | |
| 159 | 159 | echo "<li>"; |
| 160 | - echo "<strong>" . ( count(Config::$CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
|
| 160 | + echo "<strong>" . (count(Config::$CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
|
| 161 | 161 | if (count(Config::$CONSORTIUM['interworking-consortium-oi']) > 0) { |
| 162 | 162 | $consortiumlist = ""; |
| 163 | 163 | foreach (Config::$CONSORTIUM['interworking-consortium-oi'] as $oi) |
@@ -170,10 +170,10 @@ discard block |
||
| 170 | 170 | echo _("Please configure which Consortium OIs should be configured in the installers."); |
| 171 | 171 | } |
| 172 | 172 | echo "</li>"; |
| 173 | - echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>" |
|
| 174 | - . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail)."). |
|
| 173 | + echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>" |
|
| 174 | + . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") . |
|
| 175 | 175 | "</li>"; |
| 176 | - echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>" |
|
| 176 | + echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>" |
|
| 177 | 177 | . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.") |
| 178 | 178 | . "</li>"; |
| 179 | 179 | echo "</ul>"; |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | echo "</table></div>"; |
| 139 | 139 | } |
| 140 | 140 | if (Config::$CONSORTIUM['name'] == 'eduroam') |
| 141 | - $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>Federation Operator manual</a>"),"https://wiki.geant.org/x/KQB_AQ")."</h3>"; |
|
| 141 | + $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>Federation Operator manual</a>"), "https://wiki.geant.org/x/KQB_AQ") . "</h3>"; |
|
| 142 | 142 | else |
| 143 | 143 | $helptext = ""; |
| 144 | 144 | echo $helptext; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | // deployment status; need to dive into profiles for this |
| 187 | 187 | // show happy eyeballs if at least one profile is configured/showtime |
| 188 | 188 | echo "<td>"; |
| 189 | - echo ($idp_instance->isOneProfileConfigured() ? "C" : "" ) . " " . ($idp_instance->isOneProfileShowtime() ? "V" : "" ); |
|
| 189 | + echo ($idp_instance->isOneProfileConfigured() ? "C" : "") . " " . ($idp_instance->isOneProfileShowtime() ? "V" : ""); |
|
| 190 | 190 | echo "</td>"; |
| 191 | 191 | // get the coarse status overview |
| 192 | 192 | $status = $idp_instance->getAllProfileStatusOverview(); |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | $Cat = new CAT(); |
| 19 | 19 | $Cat->set_locale("web_admin"); |
| 20 | 20 | |
| 21 | -$additional_message = [ |
|
| 21 | +$additional_message = [ |
|
| 22 | 22 | L_OK => '', |
| 23 | 23 | L_REMARK => _("Some properties of the connection attempt were sub-optimal; the list is below."), |
| 24 | 24 | L_WARN => _("Some properties of the connection attempt were sub-optimal; the list is below."), |
@@ -28,20 +28,20 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | function disp_name($eap) { |
| 30 | 30 | $D = EAP::eapDisplayName($eap); |
| 31 | - return $D['OUTER'] . ( $D['INNER'] != '' ? '-' . $D['INNER'] : ''); |
|
| 31 | + return $D['OUTER'] . ($D['INNER'] != '' ? '-' . $D['INNER'] : ''); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | function printDN($dn) { |
| 35 | 35 | $out = ''; |
| 36 | 36 | foreach (array_reverse($dn) as $k => $v) { |
| 37 | - if(is_array ($v)) { |
|
| 37 | + if (is_array($v)) { |
|
| 38 | 38 | foreach ($v as $V) { |
| 39 | - if($out) |
|
| 39 | + if ($out) |
|
| 40 | 40 | $out .= ','; |
| 41 | 41 | $out .= "$k=$V"; |
| 42 | 42 | } |
| 43 | 43 | } else { |
| 44 | - if($out) |
|
| 44 | + if ($out) |
|
| 45 | 45 | $out .= ','; |
| 46 | 46 | $out .= "$k=$v"; |
| 47 | 47 | } |
@@ -50,32 +50,32 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | function printTm($tm) { |
| 53 | - return(gmdate(DateTime::COOKIE,$tm)); |
|
| 53 | + return(gmdate(DateTime::COOKIE, $tm)); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | |
| 58 | -function process_result($testsuite,$host) { |
|
| 58 | +function process_result($testsuite, $host) { |
|
| 59 | 59 | $ret = []; |
| 60 | 60 | $server_info = []; |
| 61 | 61 | $udp_result = $testsuite->UDP_reachability_result[$host]; |
| 62 | - if(isset($udp_result['certdata']) && count($udp_result['certdata'])) { |
|
| 62 | + if (isset($udp_result['certdata']) && count($udp_result['certdata'])) { |
|
| 63 | 63 | foreach ($udp_result['certdata'] as $certdata) { |
| 64 | - if($certdata['type'] != 'server' && $certdata['type'] != 'totally_selfsigned' ) |
|
| 64 | + if ($certdata['type'] != 'server' && $certdata['type'] != 'totally_selfsigned') |
|
| 65 | 65 | continue; |
| 66 | - $server_cert = [ |
|
| 66 | + $server_cert = [ |
|
| 67 | 67 | 'subject' => printDN($certdata['subject']), |
| 68 | 68 | 'issuer' => printDN($certdata['issuer']), |
| 69 | 69 | 'validFrom' => printTm($certdata['validFrom_time_t']), |
| 70 | 70 | 'validTo' => printTm($certdata['validTo_time_t']), |
| 71 | - 'serialNumber' => $certdata['serialNumber'].sprintf(" (0x%X)",$certdata['serialNumber']), |
|
| 71 | + 'serialNumber' => $certdata['serialNumber'] . sprintf(" (0x%X)", $certdata['serialNumber']), |
|
| 72 | 72 | 'sha1' => $certdata['sha1'], |
| 73 | 73 | 'extensions' => $certdata['extensions'] |
| 74 | 74 | ]; |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | $ret['server_cert'] = $server_cert; |
| 78 | - if(isset($udp_result['incoming_server_names'][0]) ) { |
|
| 78 | + if (isset($udp_result['incoming_server_names'][0])) { |
|
| 79 | 79 | $ret['server'] = sprintf(_("Connected to %s."), $udp_result['incoming_server_names'][0]); |
| 80 | 80 | } |
| 81 | 81 | else |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | exit; |
| 120 | 120 | */ |
| 121 | 121 | $hostindex = $_REQUEST['hostindex']; |
| 122 | -if(!is_numeric($hostindex)) |
|
| 122 | +if (!is_numeric($hostindex)) |
|
| 123 | 123 | exit; |
| 124 | 124 | |
| 125 | 125 | |
@@ -140,14 +140,14 @@ discard block |
||
| 140 | 140 | if ($_FILES['cert']['error'] == UPLOAD_ERR_OK) { |
| 141 | 141 | $clientcertdata = file_get_contents($_FILES['cert']['tmp_name']); |
| 142 | 142 | $privkey_pass = isset($_REQUEST['privkey_pass']) && $_REQUEST['privkey_pass'] ? $_REQUEST['privkey_pass'] : ""; //!! |
| 143 | - if(isset($_REQUEST['tls_username']) && $_REQUEST['tls_username']) { |
|
| 143 | + if (isset($_REQUEST['tls_username']) && $_REQUEST['tls_username']) { |
|
| 144 | 144 | $tls_username = valid_user($_REQUEST['tls_username']); |
| 145 | 145 | } else { |
| 146 | - if(openssl_pkcs12_read($clientcertdata,$certs,$privkey_pass)) { |
|
| 146 | + if (openssl_pkcs12_read($clientcertdata, $certs, $privkey_pass)) { |
|
| 147 | 147 | $mydetails = openssl_x509_parse($certs['cert']); |
| 148 | - if(isset($mydetails['subject']['CN']) && $mydetails['subject']['CN']) { |
|
| 149 | - $tls_username=$mydetails['subject']['CN']; |
|
| 150 | - debug(4,"PKCS12-CN=$tls_username\n"); |
|
| 148 | + if (isset($mydetails['subject']['CN']) && $mydetails['subject']['CN']) { |
|
| 149 | + $tls_username = $mydetails['subject']['CN']; |
|
| 150 | + debug(4, "PKCS12-CN=$tls_username\n"); |
|
| 151 | 151 | } else { |
| 152 | 152 | $testresult = RETVAL_INCOMPLETE_DATA; |
| 153 | 153 | $run_test = FALSE; |
@@ -161,14 +161,14 @@ discard block |
||
| 161 | 161 | $testresult = RETVAL_INCOMPLETE_DATA; |
| 162 | 162 | $run_test = FALSE; |
| 163 | 163 | } |
| 164 | - if($run_test) { |
|
| 165 | - debug(4,"TLS-USERNAME=$tls_username\n"); |
|
| 166 | - $testresult = $testsuite->UDP_login($hostindex, $eap, $tls_username, $privkey_pass,'', TRUE, TRUE, $clientcertdata); |
|
| 164 | + if ($run_test) { |
|
| 165 | + debug(4, "TLS-USERNAME=$tls_username\n"); |
|
| 166 | + $testresult = $testsuite->UDP_login($hostindex, $eap, $tls_username, $privkey_pass, '', TRUE, TRUE, $clientcertdata); |
|
| 167 | 167 | } |
| 168 | 168 | } else { |
| 169 | - $testresult = $testsuite->UDP_login($hostindex, $eap, $user_name, $user_password,$outer_user_name); |
|
| 169 | + $testresult = $testsuite->UDP_login($hostindex, $eap, $user_name, $user_password, $outer_user_name); |
|
| 170 | 170 | } |
| 171 | - $returnarray['result'][$i] = process_result($testsuite,$hostindex); |
|
| 171 | + $returnarray['result'][$i] = process_result($testsuite, $hostindex); |
|
| 172 | 172 | $returnarray['result'][$i]['eap'] = display_name($eap); |
| 173 | 173 | $returnarray['returncode'][$i] = $testresult; |
| 174 | 174 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | switch ($testresult) { |
| 177 | 177 | case RETVAL_OK : |
| 178 | 178 | $level = $returnarray['result'][$i]['level']; |
| 179 | - switch($level) { |
|
| 179 | + switch ($level) { |
|
| 180 | 180 | case L_OK : |
| 181 | 181 | $message = _("<strong>Test successful.</strong>"); |
| 182 | 182 | break; |
@@ -228,21 +228,21 @@ discard block |
||
| 228 | 228 | $i = 0; |
| 229 | 229 | $returnarray['hostindex'] = $hostindex; |
| 230 | 230 | $testresult = $testsuite->UDP_reachability($hostindex); |
| 231 | - $returnarray['result'][$i] = process_result($testsuite,$hostindex); |
|
| 231 | + $returnarray['result'][$i] = process_result($testsuite, $hostindex); |
|
| 232 | 232 | $returnarray['result'][$i]['eap'] = 'ALL'; |
| 233 | 233 | $returnarray['returncode'][$i] = $testresult; |
| 234 | 234 | // a failed check may not have gotten any certificate, be prepared for that |
| 235 | 235 | switch ($testresult) { |
| 236 | 236 | case RETVAL_CONVERSATION_REJECT: |
| 237 | 237 | $level = $returnarray['result'][$i]['level']; |
| 238 | - if($level > L_OK) |
|
| 238 | + if ($level > L_OK) |
|
| 239 | 239 | $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]; |
| 240 | 240 | else |
| 241 | 241 | $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned."); |
| 242 | 242 | break; |
| 243 | 243 | case RETVAL_IMMEDIATE_REJECT: |
| 244 | 244 | $message = _("<strong>Test FAILED</strong>: the request was rejected immediately, without EAP conversation. This is not necessarily an error: if the RADIUS server enforces that outer identities correspond to an existing username, then this result is expected (Note: you could configure a valid outer identity in your profile settings to get past this hurdle). In all other cases, the server appears misconfigured or it is unreachable."); |
| 245 | - $level= L_WARN; |
|
| 245 | + $level = L_WARN; |
|
| 246 | 246 | break; |
| 247 | 247 | case RETVAL_NO_RESPONSE: |
| 248 | 248 | $returnarray['result'][$i]['server'] = 0; |
@@ -255,10 +255,10 @@ discard block |
||
| 255 | 255 | break; |
| 256 | 256 | default: |
| 257 | 257 | $message = _("unhandled error"); |
| 258 | - $level= L_ERROR; |
|
| 258 | + $level = L_ERROR; |
|
| 259 | 259 | break; |
| 260 | 260 | } |
| 261 | -debug(4,"SERVER=".$returnarray['result'][$i]['server']."\n"); |
|
| 261 | +debug(4, "SERVER=" . $returnarray['result'][$i]['server'] . "\n"); |
|
| 262 | 262 | $returnarray['result'][$i]['level'] = $level; |
| 263 | 263 | $returnarray['result'][$i]['message'] = $message; |
| 264 | 264 | break; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | function print_test_results($t) { |
| 39 | 39 | $out = ''; |
| 40 | - switch($t->test_result['global']) { |
|
| 40 | + switch ($t->test_result['global']) { |
|
| 41 | 41 | case L_OK: |
| 42 | 42 | $message = "Your configuration appears to be fine."; |
| 43 | 43 | break; |
@@ -51,10 +51,10 @@ discard block |
||
| 51 | 51 | $message = "Your configuration appears to be fine."; |
| 52 | 52 | break; |
| 53 | 53 | } |
| 54 | - $out .= UI_message($t->test_result['global'],"<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>"); |
|
| 55 | - foreach ($t->out as $test => $test_val) { |
|
| 56 | - foreach ($test_val as $o) { |
|
| 57 | - $out .= UI_message($o['level'],$o['message']); |
|
| 54 | + $out .= UI_message($t->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>"); |
|
| 55 | + foreach ($t->out as $test => $test_val) { |
|
| 56 | + foreach ($test_val as $o) { |
|
| 57 | + $out .= UI_message($o['level'], $o['message']); |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | return($out); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | function return_test_results($t) { |
| 64 | 64 | $out = ''; |
| 65 | - switch($t->test_result['global']) { |
|
| 65 | + switch ($t->test_result['global']) { |
|
| 66 | 66 | case L_OK: |
| 67 | 67 | $message = "Your configuration appears to be fine."; |
| 68 | 68 | break; |
@@ -76,10 +76,10 @@ discard block |
||
| 76 | 76 | $message = "Your configuration appears to be fine."; |
| 77 | 77 | break; |
| 78 | 78 | } |
| 79 | - $out .= UI_message($t->test_result['global'],"<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>"); |
|
| 80 | - foreach ($t->out as $test => $test_val) { |
|
| 81 | - foreach ($test_val as $o) { |
|
| 82 | - $out .= UI_message($o['level'],$o['message']); |
|
| 79 | + $out .= UI_message($t->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>"); |
|
| 80 | + foreach ($t->out as $test => $test_val) { |
|
| 81 | + foreach ($test_val as $o) { |
|
| 82 | + $out .= UI_message($o['level'], $o['message']); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | return($out); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | $test = new SanityTest(); |
| 102 | 102 | $test->run_tests($Tests); |
| 103 | -$format = empty($_REQUEST['format']) ? 'include' : $_REQUEST['format']; |
|
| 103 | +$format = empty($_REQUEST['format']) ? 'include' : $_REQUEST['format']; |
|
| 104 | 104 | switch ($format) { |
| 105 | 105 | case 'include': |
| 106 | 106 | $o = print_test_results($test); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | $cat = defaultPagePrelude(_("Sanity check for dynamic discovery of realms")); |
| 22 | 22 | $check_thorough = FALSE; |
| 23 | -$error_message =''; |
|
| 23 | +$error_message = ''; |
|
| 24 | 24 | $my_inst = valid_IdP($_REQUEST['inst_id'], $_SESSION['user']); |
| 25 | 25 | |
| 26 | 26 | if (isset($_GET['profile_id'])) |
@@ -38,17 +38,17 @@ discard block |
||
| 38 | 38 | $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>"; |
| 39 | 39 | } |
| 40 | 40 | } else { // someone else's realm... only shallow checks |
| 41 | - if(!empty($_REQUEST['realm'])) { |
|
| 42 | - if($check_realm = valid_Realm($_REQUEST['realm'])) { |
|
| 41 | + if (!empty($_REQUEST['realm'])) { |
|
| 42 | + if ($check_realm = valid_Realm($_REQUEST['realm'])) { |
|
| 43 | 43 | $_SESSION['check_realm'] = $check_realm; |
| 44 | 44 | } |
| 45 | 45 | } else { |
| 46 | - if(!empty($_SESSION['check_realm'])) |
|
| 46 | + if (!empty($_SESSION['check_realm'])) |
|
| 47 | 47 | $check_realm = $_SESSION['check_realm']; |
| 48 | 48 | else |
| 49 | 49 | $check_realm = FALSE; |
| 50 | 50 | } |
| 51 | - if($check_realm) |
|
| 51 | + if ($check_realm) |
|
| 52 | 52 | $testsuite = new RADIUSTests($check_realm); |
| 53 | 53 | else |
| 54 | 54 | $error_message = _("No valid realm name given, cannot execute any checks!"); |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] +'" style="width: 24px;"></td><td>' + state; |
| 229 | - cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."),"'+data.ca[key].certificate[c].time_millisec+' ").")"; ?>' + add + '</td></tr>'; |
|
| 229 | + cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ") . ")"; ?>' + add + '</td></tr>'; |
|
| 230 | 230 | cliinfo = cliinfo + '</tbody></table></ul></li>'; |
| 231 | 231 | if (data.ca[key].certificate[c].finalerror==1) { |
| 232 | 232 | cliinfo = cliinfo + '<li>' + restskipped + '</li>'; |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | var v = data.result[0]; |
| 317 | 317 | $("#src"+data.hostindex+"_img").attr('src',icons[v.level]); |
| 318 | 318 | if(v.server != 0 ) { |
| 319 | - $("#src"+data.hostindex).html('<strong>'+v.server+'</strong><br/><?php printf(_("elapsed time: %sms."),"'+v.time_millisec+' ") ?><p>'+v.message+'</p>'); |
|
| 319 | + $("#src"+data.hostindex).html('<strong>'+v.server+'</strong><br/><?php printf(_("elapsed time: %sms."), "'+v.time_millisec+' ") ?><p>'+v.message+'</p>'); |
|
| 320 | 320 | var cert_data = "<tr class='server_cert'><td> </td><td colspan=2><div><dl class='server_cert_list'>"; |
| 321 | 321 | $.each(server_cert, function(l,s) { |
| 322 | 322 | cert_data = cert_data + "<dt>" + s + "</dt><dd>"+ v.server_cert[l] + "</dd>"; |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | $("#src"+data.hostindex).append(cert_data); |
| 341 | 341 | } else { |
| 342 | - $("#src"+data.hostindex).html('<br/><?php printf(_("elapsed time: %sms."),"'+v.time_millisec+' ") ?><p>'+v.message+'</p>'); |
|
| 342 | + $("#src"+data.hostindex).html('<br/><?php printf(_("elapsed time: %sms."), "'+v.time_millisec+' ") ?><p>'+v.message+'</p>'); |
|
| 343 | 343 | } |
| 344 | 344 | global_level_udp = Math.max(global_level_udp,v.level); |
| 345 | 345 | $(".server_cert").show(); |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | }); |
| 392 | 392 | } |
| 393 | 393 | o = o + cert_data+'</table>'; |
| 394 | - $("#eap_test"+data.hostindex).append('<strong><img style="position: relative; top: 2px;" src="'+icons[v.level]+'"><span style="position: relative; top: -5px; left: 1em">'+v.eap+' – <?php printf(_("elapsed time: %sms."),"'+v.time_millisec+' ") ?></span></strong><div class="more" style="padding-left: 40px"><div class="morecontent"><div style="display:none; background: #eee;">'+o+'</div><a href="" class="morelink">' + moretext + '</a></div></div>'); |
|
| 394 | + $("#eap_test"+data.hostindex).append('<strong><img style="position: relative; top: 2px;" src="'+icons[v.level]+'"><span style="position: relative; top: -5px; left: 1em">'+v.eap+' – <?php printf(_("elapsed time: %sms."), "'+v.time_millisec+' ") ?></span></strong><div class="more" style="padding-left: 40px"><div class="morecontent"><div style="display:none; background: #eee;">'+o+'</div><a href="" class="morelink">' + moretext + '</a></div></div>'); |
|
| 395 | 395 | }); |
| 396 | 396 | } |
| 397 | 397 | |
@@ -402,8 +402,8 @@ discard block |
||
| 402 | 402 | <?php |
| 403 | 403 | foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
| 404 | 404 | print " |
| 405 | -$(\"#live_src".$hostindex."_img\").attr('src',icon_loading); |
|
| 406 | -$(\"#live_src".$hostindex."_img\").show(); |
|
| 405 | +$(\"#live_src".$hostindex . "_img\").attr('src',icon_loading); |
|
| 406 | +$(\"#live_src".$hostindex . "_img\").show(); |
|
| 407 | 407 | $.ajax({ |
| 408 | 408 | url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm, |
| 409 | 409 | type: 'POST', |
@@ -434,15 +434,15 @@ discard block |
||
| 434 | 434 | <?php |
| 435 | 435 | foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
| 436 | 436 | if ($check_thorough) |
| 437 | - $extraarg = "profile_id: ".$my_profile->identifier.", "; |
|
| 437 | + $extraarg = "profile_id: " . $my_profile->identifier . ", "; |
|
| 438 | 438 | else |
| 439 | 439 | $extraarg = ""; |
| 440 | 440 | |
| 441 | 441 | print " |
| 442 | -$(\"#src".$hostindex."_img\").attr('src',icon_loading); |
|
| 442 | +$(\"#src".$hostindex . "_img\").attr('src',icon_loading); |
|
| 443 | 443 | $(\"#src$hostindex\").html(''); |
| 444 | 444 | running_ajax_stat++; |
| 445 | -$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".CAT::get_lang()."', hostindex: '$hostindex' }, udp, 'json'); |
|
| 445 | +$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . CAT::get_lang() . "', hostindex: '$hostindex' }, udp, 'json'); |
|
| 446 | 446 | |
| 447 | 447 | "; |
| 448 | 448 | } |
@@ -461,8 +461,8 @@ discard block |
||
| 461 | 461 | </script> |
| 462 | 462 | <?php |
| 463 | 463 | productheader("ADMIN", CAT::get_lang()); |
| 464 | - print "<h1>".sprintf(_("Realm testing for: %s"),$check_realm)."</h1>\n"; |
|
| 465 | - if($error_message) { |
|
| 464 | + print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n"; |
|
| 465 | + if ($error_message) { |
|
| 466 | 466 | print "<p>$error_message</p>"; |
| 467 | 467 | } else { |
| 468 | 468 | ?> |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | </legend> |
| 482 | 482 | <?php |
| 483 | 483 | // NAPTR existence check |
| 484 | - echo "<strong>"._("DNS chekcs")."</strong><div>"; |
|
| 484 | + echo "<strong>" . _("DNS chekcs") . "</strong><div>"; |
|
| 485 | 485 | $naptr = $testsuite->NAPTR(); |
| 486 | 486 | if ($naptr != RETVAL_NOTCONFIGURED) { |
| 487 | 487 | echo "<table>"; |
@@ -551,10 +551,10 @@ discard block |
||
| 551 | 551 | |
| 552 | 552 | echo "</table><table>"; |
| 553 | 553 | if (count($testsuite->listerrors()) == 0) { |
| 554 | - echo UI_message(L_OK,sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!")); |
|
| 554 | + echo UI_message(L_OK, sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!")); |
|
| 555 | 555 | echo "</table>"; |
| 556 | 556 | } else { |
| 557 | - echo UI_message(L_ERROR,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.")); |
|
| 557 | + echo UI_message(L_ERROR, 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.")); |
|
| 558 | 558 | echo "</table><div class='notacceptable'><table>"; |
| 559 | 559 | foreach ($testsuite->listerrors() as $details) |
| 560 | 560 | echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
@@ -581,9 +581,9 @@ discard block |
||
| 581 | 581 | continue;*/ |
| 582 | 582 | print " |
| 583 | 583 | running_ajax_dyn++; |
| 584 | - $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".CAT::get_lang()."', hostindex: '$hostindex' }, error: eee, success: capath, dataType: 'json'}); |
|
| 584 | + $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . CAT::get_lang() . "', hostindex: '$hostindex' }, error: eee, success: capath, dataType: 'json'}); |
|
| 585 | 585 | running_ajax_dyn++; |
| 586 | - $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '".CAT::get_lang()."', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); |
|
| 586 | + $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '" . CAT::get_lang() . "', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); |
|
| 587 | 587 | "; |
| 588 | 588 | } |
| 589 | 589 | echo "} |
@@ -592,12 +592,12 @@ discard block |
||
| 592 | 592 | } else { |
| 593 | 593 | echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
| 594 | 594 | } |
| 595 | - echo "<strong>"._("Static connectivity tests")."</strong> |
|
| 595 | + echo "<strong>" . _("Static connectivity tests") . "</strong> |
|
| 596 | 596 | <table><tr> |
| 597 | 597 | <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> |
| 598 | 598 | </tr></table>"; |
| 599 | - if($naptr > 0) { |
|
| 600 | - echo "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
| 599 | + if ($naptr > 0) { |
|
| 600 | + echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
| 601 | 601 | <table><tr> |
| 602 | 602 | <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> |
| 603 | 603 | </tr></table>"; |
@@ -611,19 +611,19 @@ discard block |
||
| 611 | 611 | <button id="run_s_tests" onclick="run_udp()"><?php echo _("Repeat static connectivity tests") ?></button> |
| 612 | 612 | <p> |
| 613 | 613 | <fieldset class="option_container" id="static_tests"> |
| 614 | - <legend><strong> <?php echo _("STATIC connectivity tests");?> </strong> </legend> |
|
| 614 | + <legend><strong> <?php echo _("STATIC connectivity tests"); ?> </strong> </legend> |
|
| 615 | 615 | <?php |
| 616 | 616 | echo sprintf(_("This check sends a request for the realm through various entry points of the %s infrastructure. The request will contain the 'Operator-Name' attribute, and will be larger than 1500 Bytes to catch two common configuration problems.<br/>Since we don't have actual credentials for the realm, we can't authenticate successfully - so the expected outcome is to get an Access-Reject after having gone through an EAP conversation."), Config::$CONSORTIUM['name']); |
| 617 | 617 | print "<p>"; |
| 618 | 618 | |
| 619 | 619 | foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
| 620 | 620 | print "<hr>"; |
| 621 | -printf(_("Testing from: %s"), "<strong>".Config::$RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
| 621 | +printf(_("Testing from: %s"), "<strong>" . Config::$RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
| 622 | 622 | print "<table id='results$hostindex' style='width:100%' class='udp_results'> |
| 623 | 623 | <tr> |
| 624 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td> |
|
| 624 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td> |
|
| 625 | 625 | <td id='src$hostindex' colspan=2> |
| 626 | -"._("testing...")." |
|
| 626 | +" . _("testing...") . " |
|
| 627 | 627 | </td> |
| 628 | 628 | </tr>" . |
| 629 | 629 | //server_cert('udp-'.$hostindex) . |
@@ -647,8 +647,8 @@ discard block |
||
| 647 | 647 | <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
| 648 | 648 | |
| 649 | 649 | $resultstoprint = []; |
| 650 | - if (count($testsuite->NAPTR_hostname_records)>0) { |
|
| 651 | - $resultstoprint[] = '<table style="align:right; display: none;" id="dynamic_result_fail">' . UI_message(L_ERROR,_("Some errors were found during the tests, see below")) . '</table><table style="align:right; display: none;" id="dynamic_result_pass">' . UI_message(L_OK,_("All tests passed, congratulations!")) . '</table>'; |
|
| 650 | + if (count($testsuite->NAPTR_hostname_records) > 0) { |
|
| 651 | + $resultstoprint[] = '<table style="align:right; display: none;" id="dynamic_result_fail">' . UI_message(L_ERROR, _("Some errors were found during the tests, see below")) . '</table><table style="align:right; display: none;" id="dynamic_result_pass">' . UI_message(L_OK, _("All tests passed, congratulations!")) . '</table>'; |
|
| 652 | 652 | $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
| 653 | 653 | foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
| 654 | 654 | /* if ($addr['family'] == "IPv6") { |
@@ -660,9 +660,9 @@ discard block |
||
| 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>"; |
@@ -678,18 +678,18 @@ discard block |
||
| 678 | 678 | $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
| 679 | 679 | $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'> |
| 680 | 680 | <tr> |
| 681 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td> |
|
| 681 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td> |
|
| 682 | 682 | <td id='srcclient$hostindex'> |
| 683 | -"._("testing...")." |
|
| 683 | +" . _("testing...") . " |
|
| 684 | 684 | </td> |
| 685 | 685 | </tr> |
| 686 | 686 | </table></span>"; |
| 687 | 687 | $clientstest[] = '</ol>'; |
| 688 | 688 | } |
| 689 | 689 | echo '<div style="align:right;">'; |
| 690 | - echo join('',$resultstoprint); |
|
| 691 | - 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>'; |
|
| 692 | - print join('',$clientstest); |
|
| 690 | + echo join('', $resultstoprint); |
|
| 691 | + 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>'; |
|
| 692 | + print join('', $clientstest); |
|
| 693 | 693 | echo '</span>'; |
| 694 | 694 | echo '</div>'; |
| 695 | 695 | } |
@@ -711,8 +711,8 @@ discard block |
||
| 711 | 711 | <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> |
| 712 | 712 | <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'> |
| 713 | 713 | <input type='hidden' name='test_type' value='udp_login'> |
| 714 | - <input type='hidden' name='lang' value='".CAT::get_lang()."'> |
|
| 715 | - <input type='hidden' name='profile_id' value='".$my_profile->identifier."'> |
|
| 714 | + <input type='hidden' name='lang' value='".CAT::get_lang() . "'> |
|
| 715 | + <input type='hidden' name='profile_id' value='".$my_profile->identifier . "'> |
|
| 716 | 716 | <table id='live_tests'>"; |
| 717 | 717 | // if any password based EAP methods are available enable this section |
| 718 | 718 | if (in_array(EAP::$PEAP_MSCHAP2, $prof_compl) || |
@@ -737,8 +737,8 @@ discard block |
||
| 737 | 737 | echo "<div id='live_login_results' style='display:none'>"; |
| 738 | 738 | foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
| 739 | 739 | print "<hr>"; |
| 740 | - printf(_("Testing from: %s"), "<strong>".Config::$RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
| 741 | - 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>"; |
|
| 740 | + printf(_("Testing from: %s"), "<strong>" . Config::$RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
| 741 | + 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>"; |
|
| 742 | 742 | print "<div id='eap_test$hostindex' class='eap_test_results'></div>"; |
| 743 | 743 | } |
| 744 | 744 | echo "</div>"; |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | |
| 90 | 90 | if (isset(Config::$CONSORTIUM['ssid']) && count(Config::$CONSORTIUM['ssid']) > 0) |
| 91 | 91 | foreach (Config::$CONSORTIUM['ssid'] as $ssidname) |
| 92 | - $ssids[] = $ssidname . " " . (isset(Config::$CONSORTIUM['tkipsupport']) && Config::$CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)") ); |
|
| 92 | + $ssids[] = $ssidname . " " . (isset(Config::$CONSORTIUM['tkipsupport']) && Config::$CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)")); |
|
| 93 | 93 | |
| 94 | 94 | $custom_ssids_wpa2 = $my_inst->getAttributes("media:SSID"); |
| 95 | 95 | $custom_ssids_wpa = $my_inst->getAttributes("media:SSID_with_legacy"); |
@@ -30,9 +30,9 @@ |
||
| 30 | 30 | $checkval = "OK-NEW"; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | -if (!isset($_GET['token']) || ( $checkval != "OK-NEW" && $checkval != "OK-EXISTING")) { |
|
| 33 | +if (!isset($_GET['token']) || ($checkval != "OK-NEW" && $checkval != "OK-EXISTING")) { |
|
| 34 | 34 | pageheader(_("Error creating new IdP binding!"), "ADMIN-IDP"); |
| 35 | - echo "<h1>"._("Error creating new IdP binding!")."</h1>"; |
|
| 35 | + echo "<h1>" . _("Error creating new IdP binding!") . "</h1>"; |
|
| 36 | 36 | if ($checkval == "FAIL-ALREADYCONSUMED") { |
| 37 | 37 | echo "<p>" . _("Sorry... this token has already been used to create an institution. If you got it from a mailing list, probably someone else used it before you.") . "</p>"; |
| 38 | 38 | } elseif ($checkval == "FAIL-EXPIRED") { |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | <script src="js/option_expand.js" type="text/javascript"></script> |
| 24 | 24 | </head> |
| 25 | 25 | <body> |
| 26 | - <?php productheader("USERMGMT",CAT::get_lang()); ?> |
|
| 26 | + <?php productheader("USERMGMT", CAT::get_lang()); ?> |
|
| 27 | 27 | <h1> |
| 28 | 28 | <?php _("Editing User Attributes"); ?> |
| 29 | 29 | </h1> |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | </button> |
| 49 | 49 | </fieldset> |
| 50 | 50 | <div> |
| 51 | - <button type='submit' name='submitbutton' value='<?php echo BUTTON_SAVE;?>'> |
|
| 51 | + <button type='submit' name='submitbutton' value='<?php echo BUTTON_SAVE; ?>'> |
|
| 52 | 52 | <?php echo _("Save data"); ?> |
| 53 | 53 | </button> |
| 54 | 54 | <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location="overview_user.php"'> |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $has_inst = $inst_mgmt->listInstitutionsByAdmin($_SESSION['user']); |
| 68 | 68 | |
| 69 | 69 | if (Config::$CONSORTIUM['name'] == 'eduroam') |
| 70 | - $helptext = " <h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>IdP administrator manual</a>)"),"https://wiki.geant.org/x/SwB_AQ")."</h3>"; |
|
| 70 | + $helptext = " <h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>IdP administrator manual</a>)"), "https://wiki.geant.org/x/SwB_AQ") . "</h3>"; |
|
| 71 | 71 | else |
| 72 | 72 | $helptext = ""; |
| 73 | 73 | |