@@ -8,7 +8,7 @@ |
||
8 | 8 | /** |
9 | 9 | * |
10 | 10 | */ |
11 | - $root = dirname(dirname(__FILE__)); |
|
12 | - include($root."/config/config.php"); |
|
13 | - set_include_path(get_include_path() . PATH_SEPARATOR . "$root/core" . PATH_SEPARATOR . "$root"); |
|
11 | + $root = dirname(dirname(__FILE__)); |
|
12 | + include($root."/config/config.php"); |
|
13 | + set_include_path(get_include_path() . PATH_SEPARATOR . "$root/core" . PATH_SEPARATOR . "$root"); |
|
14 | 14 | ?> |
@@ -141,13 +141,13 @@ discard block |
||
141 | 141 | ]; |
142 | 142 | |
143 | 143 | /** |
144 | - * Configuration for GeoIP2 |
|
145 | - * Beware, the legacy version does not really work with IPv6 addresses |
|
146 | - * version: set to 2 if you wish to use GeoIP2, to 1 for the legacy version or set to 0 to turn off geolocation service |
|
147 | - * geoip2-path-to-autoloader: points to the GeoIP2 autoloader |
|
148 | - * geoip2-path-to-db: points to the GeoIP2 city database |
|
149 | - * @var array |
|
150 | - */ |
|
144 | + * Configuration for GeoIP2 |
|
145 | + * Beware, the legacy version does not really work with IPv6 addresses |
|
146 | + * version: set to 2 if you wish to use GeoIP2, to 1 for the legacy version or set to 0 to turn off geolocation service |
|
147 | + * geoip2-path-to-autoloader: points to the GeoIP2 autoloader |
|
148 | + * geoip2-path-to-db: points to the GeoIP2 city database |
|
149 | + * @var array |
|
150 | + */ |
|
151 | 151 | |
152 | 152 | public static $GEOIP = [ |
153 | 153 | 'version' => 0, |
@@ -174,21 +174,21 @@ discard block |
||
174 | 174 | * @var array |
175 | 175 | */ |
176 | 176 | public static $LANGUAGES = [ |
177 | - 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8'], |
|
178 | - 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8'], |
|
179 | - 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8'], |
|
180 | - 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8'], |
|
181 | - 'gl' => ['display' => 'Galego', 'locale' => 'gl_ES.utf8'], |
|
182 | - 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8'], |
|
183 | - 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8'], |
|
184 | - 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8'], |
|
185 | - 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8'], |
|
186 | - 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8'], |
|
187 | - 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin'], |
|
188 | - 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8'], |
|
189 | - 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8'], |
|
190 | - 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8'], |
|
191 | - 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8'], |
|
177 | + 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8'], |
|
178 | + 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8'], |
|
179 | + 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8'], |
|
180 | + 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8'], |
|
181 | + 'gl' => ['display' => 'Galego', 'locale' => 'gl_ES.utf8'], |
|
182 | + 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8'], |
|
183 | + 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8'], |
|
184 | + 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8'], |
|
185 | + 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8'], |
|
186 | + 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8'], |
|
187 | + 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin'], |
|
188 | + 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8'], |
|
189 | + 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8'], |
|
190 | + 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8'], |
|
191 | + 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8'], |
|
192 | 192 | |
193 | 193 | // For the following languages, partial translations exist in Transifex, but |
194 | 194 | // they are not complete enough for display. Their Transifex content is not |
@@ -237,45 +237,45 @@ discard block |
||
237 | 237 | ], |
238 | 238 | |
239 | 239 | 'TLS-clientcerts' => [ |
240 | - 'CA1' => [ |
|
240 | + 'CA1' => [ |
|
241 | 241 | 'status' => 'ACCREDITED', |
242 | 242 | 'issuerCA' => '/DC=org/DC=pki1/CN=PKI 1', |
243 | 243 | 'certificates' => [ |
244 | - [ |
|
244 | + [ |
|
245 | 245 | 'status' => 'CORRECT', |
246 | 246 | 'public' => 'ca1-client-cert.pem', |
247 | 247 | 'private' => 'ca1-client-key.pem', |
248 | 248 | 'expected' => 'PASS'], |
249 | - [ |
|
249 | + [ |
|
250 | 250 | 'status' => 'WRONGPOLICY', |
251 | 251 | 'public' => 'ca1-nopolicy-cert.pem', |
252 | 252 | 'private' => 'ca1-nopolicy-key.key', |
253 | 253 | 'expected' => 'FAIL'], |
254 | - [ |
|
254 | + [ |
|
255 | 255 | 'status' => 'EXPIRED', |
256 | 256 | 'public' => 'ca1-exp.pem', |
257 | 257 | 'private' => 'ca1-exp.key', |
258 | 258 | 'expected' => 'FAIL'], |
259 | - [ |
|
259 | + [ |
|
260 | 260 | 'status' => 'REVOKED', |
261 | 261 | 'public' => 'ca1-revoked.pem', |
262 | 262 | 'private' => 'ca1-revoked.key', |
263 | 263 | 'expected' => 'FAIL'], |
264 | 264 | ] |
265 | - ], |
|
266 | - 'CA-N' => [ |
|
265 | + ], |
|
266 | + 'CA-N' => [ |
|
267 | 267 | 'status' => 'NONACCREDITED', |
268 | 268 | 'issuerCA' => '/DC=org/DC=pkiN/CN=PKI N', |
269 | 269 | 'certificates' => [ |
270 | - [ |
|
270 | + [ |
|
271 | 271 | 'status' => 'CORRECT', |
272 | 272 | 'public' => 'caN-client-cert.pem', |
273 | 273 | 'private' => 'caN-client-cert.key', |
274 | 274 | 'expected' => 'FAIL'], |
275 | - ] |
|
276 | - ] |
|
277 | - ], |
|
278 | - 'accreditedCAsURL' => '', |
|
275 | + ] |
|
276 | + ] |
|
277 | + ], |
|
278 | + 'accreditedCAsURL' => '', |
|
279 | 279 | ]; |
280 | 280 | |
281 | 281 | /** |
@@ -313,11 +313,11 @@ discard block |
||
313 | 313 | 'db' => 'customer_db', |
314 | 314 | 'user' => 'customerservice', |
315 | 315 | 'pass' => '2lame4u'], |
316 | - 'enforce-external-sync' => TRUE, |
|
317 | - /* if you feed your user database from a third-party source and do not want CAT to update it on its own, you can |
|
316 | + 'enforce-external-sync' => TRUE, |
|
317 | + /* if you feed your user database from a third-party source and do not want CAT to update it on its own, you can |
|
318 | 318 | * make it read-only |
319 | 319 | */ |
320 | - 'userdb-readonly' => FALSE, |
|
320 | + 'userdb-readonly' => FALSE, |
|
321 | 321 | ]; |
322 | 322 | |
323 | 323 | /** |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | $Cat->set_locale("web_admin"); |
20 | 20 | |
21 | 21 | $additional_message = [ |
22 | - L_OK => '', |
|
23 | - L_REMARK => _("Some properties of the connection attempt were sub-optimal; the list is below."), |
|
24 | - L_WARN => _("Some properties of the connection attempt were sub-optimal; the list is below."), |
|
25 | - L_ERROR => _("Some configuration errors were observed; the list is below."), |
|
22 | + L_OK => '', |
|
23 | + L_REMARK => _("Some properties of the connection attempt were sub-optimal; the list is below."), |
|
24 | + L_WARN => _("Some properties of the connection attempt were sub-optimal; the list is below."), |
|
25 | + L_ERROR => _("Some configuration errors were observed; the list is below."), |
|
26 | 26 | |
27 | 27 | ]; |
28 | 28 | |
@@ -32,25 +32,25 @@ discard block |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | function printDN($dn) { |
35 | - $out = ''; |
|
36 | - foreach (array_reverse($dn) as $k => $v) { |
|
37 | - if(is_array ($v)) { |
|
38 | - foreach ($v as $V) { |
|
35 | + $out = ''; |
|
36 | + foreach (array_reverse($dn) as $k => $v) { |
|
37 | + if(is_array ($v)) { |
|
38 | + foreach ($v as $V) { |
|
39 | 39 | if($out) |
40 | - $out .= ','; |
|
40 | + $out .= ','; |
|
41 | 41 | $out .= "$k=$V"; |
42 | - } |
|
43 | - } else { |
|
44 | - if($out) |
|
42 | + } |
|
43 | + } else { |
|
44 | + if($out) |
|
45 | 45 | $out .= ','; |
46 | - $out .= "$k=$v"; |
|
47 | - } |
|
48 | - } |
|
49 | - return($out); |
|
46 | + $out .= "$k=$v"; |
|
47 | + } |
|
48 | + } |
|
49 | + return($out); |
|
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 | |
@@ -60,19 +60,19 @@ discard block |
||
60 | 60 | $server_info = []; |
61 | 61 | $udp_result = $testsuite->UDP_reachability_result[$host]; |
62 | 62 | if(isset($udp_result['certdata']) && count($udp_result['certdata'])) { |
63 | - foreach ($udp_result['certdata'] as $certdata) { |
|
64 | - if($certdata['type'] != 'server' && $certdata['type'] != 'totally_selfsigned' ) |
|
65 | - continue; |
|
66 | - $server_cert = [ |
|
67 | - 'subject' => printDN($certdata['subject']), |
|
68 | - 'issuer' => printDN($certdata['issuer']), |
|
69 | - 'validFrom' => printTm($certdata['validFrom_time_t']), |
|
70 | - 'validTo' => printTm($certdata['validTo_time_t']), |
|
71 | - 'serialNumber' => $certdata['serialNumber'].sprintf(" (0x%X)",$certdata['serialNumber']), |
|
72 | - 'sha1' => $certdata['sha1'], |
|
73 | - 'extensions' => $certdata['extensions'] |
|
74 | - ]; |
|
75 | - } |
|
63 | + foreach ($udp_result['certdata'] as $certdata) { |
|
64 | + if($certdata['type'] != 'server' && $certdata['type'] != 'totally_selfsigned' ) |
|
65 | + continue; |
|
66 | + $server_cert = [ |
|
67 | + 'subject' => printDN($certdata['subject']), |
|
68 | + 'issuer' => printDN($certdata['issuer']), |
|
69 | + 'validFrom' => printTm($certdata['validFrom_time_t']), |
|
70 | + 'validTo' => printTm($certdata['validTo_time_t']), |
|
71 | + 'serialNumber' => $certdata['serialNumber'].sprintf(" (0x%X)",$certdata['serialNumber']), |
|
72 | + 'sha1' => $certdata['sha1'], |
|
73 | + 'extensions' => $certdata['extensions'] |
|
74 | + ]; |
|
75 | + } |
|
76 | 76 | } |
77 | 77 | $ret['server_cert'] = $server_cert; |
78 | 78 | if(isset($udp_result['incoming_server_names'][0]) ) { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | $hostindex = $_REQUEST['hostindex']; |
122 | 122 | if(!is_numeric($hostindex)) |
123 | - exit; |
|
123 | + exit; |
|
124 | 124 | |
125 | 125 | |
126 | 126 | $returnarray = []; |
@@ -177,16 +177,16 @@ discard block |
||
177 | 177 | case RETVAL_OK : |
178 | 178 | $level = $returnarray['result'][$i]['level']; |
179 | 179 | switch($level) { |
180 | - case L_OK : |
|
180 | + case L_OK : |
|
181 | 181 | $message = _("<strong>Test successful.</strong>"); |
182 | - break; |
|
183 | - case L_REMARK : |
|
182 | + break; |
|
183 | + case L_REMARK : |
|
184 | 184 | case L_WARN : |
185 | 185 | $message = _("<strong>Test partially successful</strong>: authentication succeded.") . ' ' . $additional_message[$level]; |
186 | - break; |
|
187 | - case L_ERROR : |
|
186 | + break; |
|
187 | + case L_ERROR : |
|
188 | 188 | $message = _("<strong>Test FAILED</strong>: authentication succeded.") . ' ' . $additional_message[$level]; |
189 | - break; |
|
189 | + break; |
|
190 | 190 | } |
191 | 191 | break; |
192 | 192 | case RETVAL_CONVERSATION_REJECT: |
@@ -36,53 +36,53 @@ discard block |
||
36 | 36 | require_once("SanityTests.php"); |
37 | 37 | |
38 | 38 | function print_test_results($t) { |
39 | - $out = ''; |
|
40 | - switch($t->test_result['global']) { |
|
41 | - case L_OK: |
|
39 | + $out = ''; |
|
40 | + switch($t->test_result['global']) { |
|
41 | + case L_OK: |
|
42 | 42 | $message = "Your configuration appears to be fine."; |
43 | - break; |
|
44 | - case L_WARN: |
|
43 | + break; |
|
44 | + case L_WARN: |
|
45 | 45 | $message = "There were some warnings, but your configuration should work."; |
46 | - break; |
|
47 | - case L_ERROR: |
|
46 | + break; |
|
47 | + case L_ERROR: |
|
48 | 48 | $message = "Your configuration appears to be broken, please fix the errors."; |
49 | - break; |
|
50 | - case L_NOTICE: |
|
49 | + break; |
|
50 | + case L_NOTICE: |
|
51 | 51 | $message = "Your configuration appears to be fine."; |
52 | - break; |
|
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']); |
|
58 | - } |
|
59 | - } |
|
60 | - return($out); |
|
52 | + break; |
|
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']); |
|
58 | + } |
|
59 | + } |
|
60 | + return($out); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | function return_test_results($t) { |
64 | - $out = ''; |
|
65 | - switch($t->test_result['global']) { |
|
66 | - case L_OK: |
|
64 | + $out = ''; |
|
65 | + switch($t->test_result['global']) { |
|
66 | + case L_OK: |
|
67 | 67 | $message = "Your configuration appears to be fine."; |
68 | - break; |
|
69 | - case L_WARN: |
|
68 | + break; |
|
69 | + case L_WARN: |
|
70 | 70 | $message = "There were some warnings, but your configuration should work."; |
71 | - break; |
|
72 | - case L_ERROR: |
|
71 | + break; |
|
72 | + case L_ERROR: |
|
73 | 73 | $message = "Your configuration appears to be broken, please fix the errors."; |
74 | - break; |
|
75 | - case L_NOTICE: |
|
74 | + break; |
|
75 | + case L_NOTICE: |
|
76 | 76 | $message = "Your configuration appears to be fine."; |
77 | - break; |
|
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']); |
|
83 | - } |
|
84 | - } |
|
85 | - return($out); |
|
77 | + break; |
|
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']); |
|
83 | + } |
|
84 | + } |
|
85 | + return($out); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | authenticate(); |
94 | 94 | $user = new User($_SESSION['user']); |
95 | 95 | if (!$user->isSuperadmin()) { |
96 | - print "Not Superadmin"; |
|
97 | - exit; |
|
96 | + print "Not Superadmin"; |
|
97 | + exit; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | break; |
109 | 109 | case 'html': |
110 | 110 | header("Content-Type:text/html;charset=utf-8"); |
111 | - echo "<!DOCTYPE html> |
|
111 | + echo "<!DOCTYPE html> |
|
112 | 112 | <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'> |
113 | 113 | <head lang='$ourlocale'> |
114 | 114 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'></head>"; |
@@ -28,30 +28,30 @@ discard block |
||
28 | 28 | else |
29 | 29 | $my_profile = NULL; |
30 | 30 | if ($my_profile != NULL) { |
31 | - $cr = $my_profile->getAttributes("internal:realm"); |
|
32 | - if ($cr) { |
|
33 | - // checking our own stuff. Enable thorough checks |
|
34 | - $check_thorough = TRUE; |
|
35 | - $check_realm = $cr[0]['value']; |
|
36 | - $testsuite = new RADIUSTests($check_realm, $my_profile->identifier); |
|
37 | - } else { |
|
38 | - $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>"; |
|
39 | - } |
|
31 | + $cr = $my_profile->getAttributes("internal:realm"); |
|
32 | + if ($cr) { |
|
33 | + // checking our own stuff. Enable thorough checks |
|
34 | + $check_thorough = TRUE; |
|
35 | + $check_realm = $cr[0]['value']; |
|
36 | + $testsuite = new RADIUSTests($check_realm, $my_profile->identifier); |
|
37 | + } else { |
|
38 | + $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>"; |
|
39 | + } |
|
40 | 40 | } else { // someone else's realm... only shallow checks |
41 | - if(!empty($_REQUEST['realm'])) { |
|
42 | - if($check_realm = valid_Realm($_REQUEST['realm'])) { |
|
43 | - $_SESSION['check_realm'] = $check_realm; |
|
44 | - } |
|
45 | - } else { |
|
46 | - if(!empty($_SESSION['check_realm'])) |
|
47 | - $check_realm = $_SESSION['check_realm']; |
|
48 | - else |
|
49 | - $check_realm = FALSE; |
|
50 | - } |
|
51 | - if($check_realm) |
|
52 | - $testsuite = new RADIUSTests($check_realm); |
|
53 | - else |
|
54 | - $error_message = _("No valid realm name given, cannot execute any checks!"); |
|
41 | + if(!empty($_REQUEST['realm'])) { |
|
42 | + if($check_realm = valid_Realm($_REQUEST['realm'])) { |
|
43 | + $_SESSION['check_realm'] = $check_realm; |
|
44 | + } |
|
45 | + } else { |
|
46 | + if(!empty($_SESSION['check_realm'])) |
|
47 | + $check_realm = $_SESSION['check_realm']; |
|
48 | + else |
|
49 | + $check_realm = FALSE; |
|
50 | + } |
|
51 | + if($check_realm) |
|
52 | + $testsuite = new RADIUSTests($check_realm); |
|
53 | + else |
|
54 | + $error_message = _("No valid realm name given, cannot execute any checks!"); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | $translate = _("STATIC"); |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | var formData = new FormData($('#live_form')[0]); |
402 | 402 | <?php |
403 | 403 | foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
404 | - print " |
|
404 | + print " |
|
405 | 405 | $(\"#live_src".$hostindex."_img\").attr('src',icon_loading); |
406 | 406 | $(\"#live_src".$hostindex."_img\").show(); |
407 | 407 | $.ajax({ |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | else |
439 | 439 | $extraarg = ""; |
440 | 440 | |
441 | - print " |
|
441 | + print " |
|
442 | 442 | $(\"#src".$hostindex."_img\").attr('src',icon_loading); |
443 | 443 | $(\"#src$hostindex\").html(''); |
444 | 444 | running_ajax_stat++; |
@@ -480,89 +480,89 @@ discard block |
||
480 | 480 | <strong><?php echo _("Overview") ?></strong> |
481 | 481 | </legend> |
482 | 482 | <?php |
483 | - // NAPTR existence check |
|
484 | - echo "<strong>"._("DNS chekcs")."</strong><div>"; |
|
485 | - $naptr = $testsuite->NAPTR(); |
|
486 | - if ($naptr != RETVAL_NOTCONFIGURED) { |
|
487 | - echo "<table>"; |
|
488 | - // output in friendly words |
|
489 | - echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
490 | - switch ($naptr) { |
|
491 | - case RETVAL_NONAPTR: |
|
483 | + // NAPTR existence check |
|
484 | + echo "<strong>"._("DNS chekcs")."</strong><div>"; |
|
485 | + $naptr = $testsuite->NAPTR(); |
|
486 | + if ($naptr != RETVAL_NOTCONFIGURED) { |
|
487 | + echo "<table>"; |
|
488 | + // output in friendly words |
|
489 | + echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
490 | + switch ($naptr) { |
|
491 | + case RETVAL_NONAPTR: |
|
492 | 492 | echo _("This realm has no NAPTR records."); |
493 | 493 | break; |
494 | - case RETVAL_ONLYUNRELATEDNAPTR: |
|
494 | + case RETVAL_ONLYUNRELATEDNAPTR: |
|
495 | 495 | printf(_("This realm has NAPTR records, but none are associated with %s."), Config::$CONSORTIUM['name']); |
496 | 496 | break; |
497 | - default: // if none of the possible negative retvals, then we have matching NAPTRs |
|
497 | + default: // if none of the possible negative retvals, then we have matching NAPTRs |
|
498 | 498 | printf(_("This realm has %d %s NAPTR records."), $naptr, Config::$CONSORTIUM['name']); |
499 | - } |
|
500 | - echo "</td></tr>"; |
|
499 | + } |
|
500 | + echo "</td></tr>"; |
|
501 | 501 | |
502 | - // compliance checks for NAPTRs |
|
502 | + // compliance checks for NAPTRs |
|
503 | 503 | |
504 | - if ($naptr > 0) { |
|
505 | - echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
506 | - $naptr_valid = $testsuite->NAPTR_compliance(); |
|
507 | - switch ($naptr_valid) { |
|
508 | - case RETVAL_OK: |
|
504 | + if ($naptr > 0) { |
|
505 | + echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
506 | + $naptr_valid = $testsuite->NAPTR_compliance(); |
|
507 | + switch ($naptr_valid) { |
|
508 | + case RETVAL_OK: |
|
509 | 509 | echo _("No issues found."); |
510 | 510 | break; |
511 | - case RETVAL_INVALID: |
|
511 | + case RETVAL_INVALID: |
|
512 | 512 | printf(_("At least one NAPTR with invalid content found!")); |
513 | 513 | break; |
514 | - } |
|
515 | - echo "</td></tr>"; |
|
514 | + } |
|
515 | + echo "</td></tr>"; |
|
516 | 516 | } |
517 | 517 | |
518 | 518 | // SRV resolution |
519 | 519 | |
520 | 520 | if ($naptr > 0 && $naptr_valid == RETVAL_OK) { |
521 | - $srv = $testsuite->NAPTR_SRV(); |
|
522 | - echo "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
523 | - switch ($srv) { |
|
524 | - case RETVAL_SKIPPED: |
|
521 | + $srv = $testsuite->NAPTR_SRV(); |
|
522 | + echo "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
523 | + switch ($srv) { |
|
524 | + case RETVAL_SKIPPED: |
|
525 | 525 | echo _("This check was skipped."); |
526 | - break; |
|
527 | - case RETVAL_INVALID: |
|
526 | + break; |
|
527 | + case RETVAL_INVALID: |
|
528 | 528 | printf(_("At least one NAPTR with invalid content found!")); |
529 | - break; |
|
530 | - default: // print number of successfully retrieved SRV targets |
|
529 | + break; |
|
530 | + default: // print number of successfully retrieved SRV targets |
|
531 | 531 | printf(_("%d host names discovered."), $srv); |
532 | - } |
|
533 | - echo "</td></tr>"; |
|
532 | + } |
|
533 | + echo "</td></tr>"; |
|
534 | 534 | } |
535 | 535 | // IP addresses for the hosts |
536 | 536 | if ($naptr > 0 && $naptr_valid == RETVAL_OK && $srv > 0) { |
537 | - $hosts = $testsuite->NAPTR_hostnames(); |
|
538 | - echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
539 | - switch ($srv) { |
|
540 | - case RETVAL_SKIPPED: |
|
537 | + $hosts = $testsuite->NAPTR_hostnames(); |
|
538 | + echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
539 | + switch ($srv) { |
|
540 | + case RETVAL_SKIPPED: |
|
541 | 541 | echo _("This check was skipped."); |
542 | - break; |
|
543 | - case RETVAL_INVALID: |
|
542 | + break; |
|
543 | + case RETVAL_INVALID: |
|
544 | 544 | printf(_("At least one hostname could not be resolved!")); |
545 | - break; |
|
546 | - default: // print number of successfully retrieved SRV targets |
|
545 | + break; |
|
546 | + default: // print number of successfully retrieved SRV targets |
|
547 | 547 | printf(_("%d IP addresses resolved."), $hosts); |
548 | - } |
|
549 | - echo "</td></tr>"; |
|
548 | + } |
|
549 | + echo "</td></tr>"; |
|
550 | 550 | } |
551 | 551 | |
552 | 552 | echo "</table><table>"; |
553 | - if (count($testsuite->listerrors()) == 0) { |
|
553 | + if (count($testsuite->listerrors()) == 0) { |
|
554 | 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 | - } else { |
|
556 | + } else { |
|
557 | 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 | - echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
560 | + echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
561 | 561 | echo "</table></div>"; |
562 | - } |
|
563 | - echo '</div>'; |
|
562 | + } |
|
563 | + echo '</div>'; |
|
564 | 564 | |
565 | - echo '<script type="text/javascript"> |
|
565 | + echo '<script type="text/javascript"> |
|
566 | 566 | function run_dynamic() { |
567 | 567 | running_ajax_dyn = 0; |
568 | 568 | $("#main_dynamic_ico").attr("src",icon_loading); |
@@ -571,37 +571,37 @@ discard block |
||
571 | 571 | global_level_dyn = L_OK; |
572 | 572 | $("#dynamic_tests").show(); |
573 | 573 | '; |
574 | - foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
|
575 | - $host = ''; |
|
576 | - if ($addr['family'] == "IPv6") $host .= '['; |
|
577 | - $host .= $addr['IP']; |
|
578 | - if ($addr['family'] == "IPv6") $host .= ']'; |
|
579 | - $host .= ':' . $addr['port']; |
|
574 | + foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
|
575 | + $host = ''; |
|
576 | + if ($addr['family'] == "IPv6") $host .= '['; |
|
577 | + $host .= $addr['IP']; |
|
578 | + if ($addr['family'] == "IPv6") $host .= ']'; |
|
579 | + $host .= ':' . $addr['port']; |
|
580 | 580 | /*if($addr['family'] == "IPv6") |
581 | 581 | continue;*/ |
582 | - print " |
|
582 | + print " |
|
583 | 583 | running_ajax_dyn++; |
584 | 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 | 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 | - } |
|
589 | - echo "} |
|
588 | + } |
|
589 | + echo "} |
|
590 | 590 | </script><hr>"; |
591 | 591 | |
592 | - } else { |
|
593 | - echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
594 | - } |
|
595 | - echo "<strong>"._("Static connectivity tests")."</strong> |
|
592 | + } else { |
|
593 | + echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
594 | + } |
|
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>"; |
604 | - } |
|
604 | + } |
|
605 | 605 | ?> |
606 | 606 | |
607 | 607 | </fieldset> |
@@ -613,11 +613,11 @@ discard block |
||
613 | 613 | <fieldset class="option_container" id="static_tests"> |
614 | 614 | <legend><strong> <?php echo _("STATIC connectivity tests");?> </strong> </legend> |
615 | 615 | <?php |
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']); |
|
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 | - print "<hr>"; |
|
620 | + print "<hr>"; |
|
621 | 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> |
@@ -637,28 +637,28 @@ discard block |
||
637 | 637 | </div> |
638 | 638 | |
639 | 639 | <?php |
640 | - if ($naptr > 0) { |
|
640 | + if ($naptr > 0) { |
|
641 | 641 | ?> |
642 | 642 | <div id="tabs-3"> |
643 | 643 | <button id="run_d_tests" onclick="run_dynamic()"><?php echo _("Repeat dynamic connectivity tests") ?></button> |
644 | 644 | |
645 | 645 | <?php |
646 | - echo "<div id='dynamic_tests'><fieldset class='option_container'> |
|
646 | + echo "<div id='dynamic_tests'><fieldset class='option_container'> |
|
647 | 647 | <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
648 | 648 | |
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>'; |
|
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 | - foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
|
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>'; |
|
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 | + foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
|
654 | 654 | /* if ($addr['family'] == "IPv6") { |
655 | 655 | $resultstoprint[] = '<strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . "</strong><ul style='list-style-type: none;'><li>" . _('Due to OpenSSL limitations, it is not possible to check IPv6 addresses at this time.') . '</li></ul>'; |
656 | 656 | continue; |
657 | 657 | }*/ |
658 | - $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]); |
|
659 | - $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>'; |
|
660 | - $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
|
661 | - $resultstoprint[] = "<table id='caresults$hostindex' style='width:100%'> |
|
658 | + $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]); |
|
659 | + $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>'; |
|
660 | + $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
|
661 | + $resultstoprint[] = "<table id='caresults$hostindex' style='width:100%'> |
|
662 | 662 | <tr> |
663 | 663 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td> |
664 | 664 | <td id='srcca$hostindex'> |
@@ -666,17 +666,17 @@ discard block |
||
666 | 666 | </td> |
667 | 667 | </tr> |
668 | 668 | </table>"; |
669 | - $resultstoprint[] = '</li></ul>'; |
|
670 | - } |
|
671 | - $clientstest = []; |
|
672 | - foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
|
673 | - //$clientsres = $testsuite->TLS_client_side_tests(); |
|
669 | + $resultstoprint[] = '</li></ul>'; |
|
670 | + } |
|
671 | + $clientstest = []; |
|
672 | + foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
|
673 | + //$clientsres = $testsuite->TLS_client_side_tests(); |
|
674 | 674 | /* if ($addr['family'] == 'IPv6') { |
675 | 675 | $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p>' . "<ul style='list-style-type: none;'><li>" . _('Due to OpenSSL limitations, it is not possible to check IPv6 addresses at this time.') . '</li></ul>'; |
676 | 676 | continue; |
677 | 677 | }*/ |
678 | - $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
|
679 | - $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'> |
|
678 | + $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
|
679 | + $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'> |
|
680 | 680 | <tr> |
681 | 681 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td> |
682 | 682 | <td id='srcclient$hostindex'> |
@@ -684,29 +684,29 @@ discard block |
||
684 | 684 | </td> |
685 | 685 | </tr> |
686 | 686 | </table></span>"; |
687 | - $clientstest[] = '</ol>'; |
|
688 | - } |
|
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); |
|
693 | - echo '</span>'; |
|
694 | - echo '</div>'; |
|
695 | - } |
|
696 | - echo "</fieldset></div></div>"; |
|
697 | - } |
|
698 | - // further checks TBD: |
|
699 | - // check if accepts certificates from all accredited CAs |
|
700 | - // check if doesn't accept revoked certificates |
|
701 | - // check if RADIUS request gets rejected timely |
|
702 | - // check if truncates/dies on Operator-Name |
|
703 | - if ($check_thorough) { |
|
704 | - echo "<div id='tabs-4'><fieldset class='option_container'> |
|
687 | + $clientstest[] = '</ol>'; |
|
688 | + } |
|
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); |
|
693 | + echo '</span>'; |
|
694 | + echo '</div>'; |
|
695 | + } |
|
696 | + echo "</fieldset></div></div>"; |
|
697 | + } |
|
698 | + // further checks TBD: |
|
699 | + // check if accepts certificates from all accredited CAs |
|
700 | + // check if doesn't accept revoked certificates |
|
701 | + // check if RADIUS request gets rejected timely |
|
702 | + // check if truncates/dies on Operator-Name |
|
703 | + if ($check_thorough) { |
|
704 | + echo "<div id='tabs-4'><fieldset class='option_container'> |
|
705 | 705 | <legend><strong>" . _("Live login test") . "</strong></legend>"; |
706 | - $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1); |
|
707 | - if (count($prof_compl) > 0) { |
|
706 | + $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1); |
|
707 | + if (count($prof_compl) > 0) { |
|
708 | 708 | |
709 | - 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> |
|
709 | + 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> |
|
710 | 710 | <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> |
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'> |
@@ -715,44 +715,44 @@ discard block |
||
715 | 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 | - if (in_array(EAP::$PEAP_MSCHAP2, $prof_compl) || |
|
718 | + if (in_array(EAP::$PEAP_MSCHAP2, $prof_compl) || |
|
719 | 719 | in_array(EAP::$TTLS_MSCHAP2, $prof_compl) || |
720 | 720 | in_array(EAP::$TTLS_GTC, $prof_compl) || |
721 | 721 | in_array(EAP::$FAST_GTC, $prof_compl) || |
722 | 722 | in_array(EAP::$PWD, $prof_compl) || |
723 | 723 | in_array(EAP::$TTLS_PAP, $prof_compl) |
724 | - ) { |
|
725 | - echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr> |
|
724 | + ) { |
|
725 | + echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr> |
|
726 | 726 | <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
727 | - echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
728 | - echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
729 | - } |
|
730 | - // ask for cert + privkey if TLS-based method is active |
|
731 | - if (in_array(EAP::$TLS, $prof_compl)) |
|
732 | - echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr> |
|
727 | + echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
728 | + echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
729 | + } |
|
730 | + // ask for cert + privkey if TLS-based method is active |
|
731 | + if (in_array(EAP::$TLS, $prof_compl)) |
|
732 | + echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr> |
|
733 | 733 | <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
734 | 734 | <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
735 | 735 | <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
736 | - echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>"; |
|
737 | - echo "<div id='live_login_results' style='display:none'>"; |
|
738 | - foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
|
736 | + echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>"; |
|
737 | + echo "<div id='live_login_results' style='display:none'>"; |
|
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 | - echo "</div>"; |
|
744 | + echo "</div>"; |
|
745 | 745 | |
746 | - } else {// no EAP methods fully defined |
|
747 | - echo "Live Login Checks require at least one fully configured EAP type."; |
|
748 | - } |
|
749 | - echo "</fieldset></div>"; |
|
750 | - } |
|
746 | + } else {// no EAP methods fully defined |
|
747 | + echo "Live Login Checks require at least one fully configured EAP type."; |
|
748 | + } |
|
749 | + echo "</fieldset></div>"; |
|
750 | + } |
|
751 | 751 | echo " |
752 | 752 | </div> |
753 | 753 | "; |
754 | 754 | } |
755 | - ?> |
|
755 | + ?> |
|
756 | 756 | <form method='post' action='overview_idp.php?inst_id=<?php echo $my_inst->identifier; ?>' accept-charset='UTF-8'> |
757 | 757 | <button type='submit' name='submitbutton' value='<?php echo BUTTON_CLOSE; ?>'><?php echo _("Return to dashboard"); ?></button> |
758 | 758 | </form> |
@@ -763,11 +763,11 @@ discard block |
||
763 | 763 | run_udp(); |
764 | 764 | <?php |
765 | 765 | if ($naptr > 0) |
766 | - echo "run_dynamic();"; |
|
766 | + echo "run_dynamic();"; |
|
767 | 767 | else |
768 | - echo '$("#tabs-d-li").hide();'; |
|
768 | + echo '$("#tabs-d-li").hide();'; |
|
769 | 769 | if (!$check_thorough) |
770 | - echo '$("#tabs-through").hide();'; |
|
770 | + echo '$("#tabs-through").hide();'; |
|
771 | 771 | ?> |
772 | 772 | </script> |
773 | 773 | <?php footer() ?> |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | authenticate(); |
44 | 44 | $no_security = 0; |
45 | 45 | } else { |
46 | - $no_security = 1; |
|
46 | + $no_security = 1; |
|
47 | 47 | } |
48 | 48 | $user = new User((!in_array("I do not care about security!", Config::$SUPERADMINS) ? $_SESSION['user'] : "UNIDENTIFIED")); |
49 | 49 | |
@@ -61,16 +61,16 @@ discard block |
||
61 | 61 | </legend> |
62 | 62 | <?php |
63 | 63 | if (isset($_POST['admin_action'])) { |
64 | - if($_POST['admin_action'] == BUTTON_SANITY_TESTS) |
|
64 | + if($_POST['admin_action'] == BUTTON_SANITY_TESTS) |
|
65 | 65 | include("sanity_tests.php"); |
66 | 66 | } |
67 | 67 | ?> |
68 | 68 | <button type="submit" name="admin_action" value="<?php echo BUTTON_SANITY_TESTS; ?>">Run configuration check</button> |
69 | 69 | </fieldset> |
70 | 70 | <?php if($no_security) { |
71 | - print "<h2 style='color: red'>In order to do more you need to configure the SUPERADMIN section in config/config.php and login as one.</h2>"; |
|
71 | + print "<h2 style='color: red'>In order to do more you need to configure the SUPERADMIN section in config/config.php and login as one.</h2>"; |
|
72 | 72 | |
73 | - } else { |
|
73 | + } else { |
|
74 | 74 | ?> |
75 | 75 | <fieldset class="option_container"> |
76 | 76 | <legend> |
@@ -283,7 +283,7 @@ |
||
283 | 283 | if ($wizard) |
284 | 284 | echo "<p>". |
285 | 285 | _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you."). |
286 | - "</p> |
|
286 | + "</p> |
|
287 | 287 | <ul>". |
288 | 288 | _("<li>Drag the marker in the map to your place, or</li> |
289 | 289 | <li>enter your street address in the field below for lookup, or</li> |
@@ -140,7 +140,7 @@ |
||
140 | 140 | $message .= wordwrap(_("Additional message from your federation administrator:"),72) . " |
141 | 141 | --------------------------------- |
142 | 142 | " |
143 | - . wordwrap($customtext[0]['value'],72) . " |
|
143 | + . wordwrap($customtext[0]['value'],72) . " |
|
144 | 144 | --------------------------------- |
145 | 145 | |
146 | 146 | "; |
@@ -25,33 +25,33 @@ |
||
25 | 25 | $list = $optioninfo->availableOptions($_GET["class"]); |
26 | 26 | |
27 | 27 | switch ($_GET['class']) { |
28 | - case "general": |
|
29 | - $blacklist_item = array_search("general:geo_coordinates", $list); |
|
30 | - if ($blacklist_item !== FALSE) { |
|
31 | - unset($list[$blacklist_item]); |
|
32 | - $list = array_values($list); |
|
33 | - } |
|
34 | - break; |
|
35 | - case "user": |
|
36 | - $blacklist_item = array_search("user:fedadmin", $list); |
|
37 | - if ($blacklist_item !== FALSE) { |
|
38 | - unset($list[$blacklist_item]); |
|
39 | - $list = array_values($list); |
|
40 | - } |
|
41 | - break; |
|
42 | - case "eap": |
|
43 | - case "support": |
|
44 | - case "profile": |
|
45 | - case "media": |
|
46 | - case "fed": |
|
47 | - $list = array_values($list); |
|
48 | - break; |
|
49 | - case "device-specific": |
|
50 | - case "eap-specific": |
|
51 | - break; |
|
52 | - default: |
|
53 | - debug(1,"Unknown type of option!"); |
|
54 | - exit(1); |
|
28 | + case "general": |
|
29 | + $blacklist_item = array_search("general:geo_coordinates", $list); |
|
30 | + if ($blacklist_item !== FALSE) { |
|
31 | + unset($list[$blacklist_item]); |
|
32 | + $list = array_values($list); |
|
33 | + } |
|
34 | + break; |
|
35 | + case "user": |
|
36 | + $blacklist_item = array_search("user:fedadmin", $list); |
|
37 | + if ($blacklist_item !== FALSE) { |
|
38 | + unset($list[$blacklist_item]); |
|
39 | + $list = array_values($list); |
|
40 | + } |
|
41 | + break; |
|
42 | + case "eap": |
|
43 | + case "support": |
|
44 | + case "profile": |
|
45 | + case "media": |
|
46 | + case "fed": |
|
47 | + $list = array_values($list); |
|
48 | + break; |
|
49 | + case "device-specific": |
|
50 | + case "eap-specific": |
|
51 | + break; |
|
52 | + default: |
|
53 | + debug(1,"Unknown type of option!"); |
|
54 | + exit(1); |
|
55 | 55 | } |
56 | 56 | // echo "<pre>".print_r($list)."</pre>"; |
57 | 57 |