@@ -31,10 +31,11 @@ discard block |
||
| 31 | 31 | $idpoptions = $my_inst->getAttributes(); |
| 32 | 32 | $inst_name = $my_inst->name; |
| 33 | 33 | |
| 34 | -if ($wizard_style) |
|
| 34 | +if ($wizard_style) { |
|
| 35 | 35 | $cat = defaultPagePrelude(sprintf(_("%s: IdP enrollment wizard (step 2)"), Config::$APPEARANCE['productname'])); |
| 36 | -else |
|
| 36 | +} else { |
|
| 37 | 37 | $cat = defaultPagePrelude(sprintf(_("%s: Editing IdP '%s'"), Config::$APPEARANCE['productname'], $inst_name)); |
| 38 | +} |
|
| 38 | 39 | // let's check if the inst handle actually exists in the DB and user is authorised |
| 39 | 40 | ?> |
| 40 | 41 | <script src="js/option_expand.js" type="text/javascript"></script> |
@@ -43,9 +44,10 @@ discard block |
||
| 43 | 44 | |
| 44 | 45 | <?php |
| 45 | 46 | $additional = FALSE; |
| 46 | -foreach ($idpoptions as $optionname => $optionvalue) |
|
| 47 | +foreach ($idpoptions as $optionname => $optionvalue) { |
|
| 47 | 48 | if ($optionvalue['name'] == "general:geo_coordinates") |
| 48 | 49 | $additional = TRUE; |
| 50 | +} |
|
| 49 | 51 | geo_widget_head($my_inst->federation, $inst_name) |
| 50 | 52 | ?> |
| 51 | 53 | <script> |
@@ -74,10 +76,11 @@ discard block |
||
| 74 | 76 | |
| 75 | 77 | <h1> |
| 76 | 78 | <?php |
| 77 | -if ($wizard_style) |
|
| 79 | +if ($wizard_style) { |
|
| 78 | 80 | echo _("Step 2: General Information about your IdP"); |
| 79 | -else |
|
| 81 | +} else { |
|
| 80 | 82 | printf(_("Editing IdP information for '%s'"), $inst_name); |
| 83 | +} |
|
| 81 | 84 | ?> |
| 82 | 85 | </h1> |
| 83 | 86 | <div class='infobox'> |
@@ -98,9 +101,10 @@ discard block |
||
| 98 | 101 | echo "<form enctype='multipart/form-data' action='edit_idp_result.php?inst_id=$my_inst->identifier" . ($wizard_style ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'> |
| 99 | 102 | <input type='hidden' name='MAX_FILE_SIZE' value='" . Config::$MAX_UPLOAD_SIZE . "'>"; |
| 100 | 103 | |
| 101 | -if ($wizard_style) |
|
| 104 | +if ($wizard_style) { |
|
| 102 | 105 | echo "<p>" . |
| 103 | 106 | _("Hello, newcomer. Your institution is new to us. This wizard will ask you several questions about your IdP, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users.") . "</p>"; |
| 107 | +} |
|
| 104 | 108 | ?> |
| 105 | 109 | <fieldset class="option_container"> |
| 106 | 110 | <legend><strong><?php echo _("General Information"); ?></strong></legend> |
@@ -143,12 +147,14 @@ discard block |
||
| 143 | 147 | echo "<strong>" . ( count(Config::$CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
| 144 | 148 | if (count(Config::$CONSORTIUM['ssid']) > 0) { |
| 145 | 149 | $ssidlist = ""; |
| 146 | - foreach (Config::$CONSORTIUM['ssid'] as $ssid) |
|
| 147 | - $ssidlist .= ", '<strong>" . $ssid . "</strong>'"; |
|
| 150 | + foreach (Config::$CONSORTIUM['ssid'] as $ssid) { |
|
| 151 | + $ssidlist .= ", '<strong>" . $ssid . "</strong>'"; |
|
| 152 | + } |
|
| 148 | 153 | $ssidlist = substr($ssidlist, 2); |
| 149 | 154 | echo sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(Config::$CONSORTIUM['ssid'])), $ssidlist); |
| 150 | - if (Config::$CONSORTIUM['tkipsupport']) |
|
| 151 | - echo " " . _("They will also be configured for WPA/TKIP if the device supports multiple encryption types."); |
|
| 155 | + if (Config::$CONSORTIUM['tkipsupport']) { |
|
| 156 | + echo " " . _("They will also be configured for WPA/TKIP if the device supports multiple encryption types."); |
|
| 157 | + } |
|
| 152 | 158 | echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the options '%s' and '%s' below."), display_name("media:SSID"), display_name("media:SSID_with_legacy")); |
| 153 | 159 | } else { |
| 154 | 160 | echo _("Please configure which SSIDs should be configured in the installers."); |
@@ -160,8 +166,9 @@ discard block |
||
| 160 | 166 | echo "<strong>" . ( count(Config::$CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
| 161 | 167 | if (count(Config::$CONSORTIUM['interworking-consortium-oi']) > 0) { |
| 162 | 168 | $consortiumlist = ""; |
| 163 | - foreach (Config::$CONSORTIUM['interworking-consortium-oi'] as $oi) |
|
| 164 | - $consortiumlist .= ", '<strong>" . $oi . "</strong>'"; |
|
| 169 | + foreach (Config::$CONSORTIUM['interworking-consortium-oi'] as $oi) { |
|
| 170 | + $consortiumlist .= ", '<strong>" . $oi . "</strong>'"; |
|
| 171 | + } |
|
| 165 | 172 | $consortiumlist = substr($consortiumlist, 2); |
| 166 | 173 | echo sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(Config::$CONSORTIUM['interworking-consortium-oi'])), $consortiumlist); |
| 167 | 174 | |
@@ -190,11 +197,12 @@ discard block |
||
| 190 | 197 | <fieldset class="option_container"> |
| 191 | 198 | <legend><strong><?php echo _("Helpdesk Details for all users"); ?></strong></legend> |
| 192 | 199 | <?php |
| 193 | -if ($wizard_style) |
|
| 200 | +if ($wizard_style) { |
|
| 194 | 201 | echo "<p>" . |
| 195 | 202 | _("If your IdP provides a helpdesk for its users, it would be nice if you would tell us the pointers to this helpdesk. Some site installers might be able to signal this information to the user if he gets stuck.") . "</p> |
| 196 | 203 | <p>" . |
| 197 | 204 | _("If you enter a value here, it will be added to the site installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles'), or operate no help desk at all (shame on you!), you can also leave any of these fields empty and optionally specify per-profile helpdesk information later in this wizard.") . "</p>"; |
| 205 | +} |
|
| 198 | 206 | ?> |
| 199 | 207 | |
| 200 | 208 | <table id="expandable_support_options"> |
@@ -206,9 +214,10 @@ discard block |
||
| 206 | 214 | <!-- <fieldset class="option_container"> |
| 207 | 215 | <legend><strong><?php echo _("EAP details for all users"); ?></strong></legend> |
| 208 | 216 | <?php |
| 209 | -if ($wizard_style) |
|
| 217 | +if ($wizard_style) { |
|
| 210 | 218 | echo "<p>" . _("Most EAP methods need server-side authentication details, like the CA certificate and/or server name(s) of your authentication servers. If all the EAP methods you support work with the same CA and or Common Names of servers, you can enter them here and they will be added as trust anchors in all profiles. If the details differ per profile or per EAP-type, you can also enter them in the individual profiles later.") . "</p> |
| 211 | 219 | <p>" . sprintf(_("<strong>Note well: </strong>The server-side validation is a cornerstone of %s; without it, users are subject to man-in-the-middle attacks! We will not generate site installers without Trusted CA anchors and server names."), Config::$CONSORTIUM['name']) . "</p>"; |
| 220 | +} |
|
| 212 | 221 | ?> |
| 213 | 222 | <table id="expandable_eapserver_options"> |
| 214 | 223 | <?php |
@@ -18,10 +18,11 @@ |
||
| 18 | 18 | if ($ls['Code'] === 'urn:oasis:names:tc:SAML:2.0:status:Success' && !isset($ls['SubCode'])) { |
| 19 | 19 | /* Successful logout. */ |
| 20 | 20 | $url = htmlspecialchars($_SERVER['HTTP_HOST']) . substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], "/admin/logout_check.php")); |
| 21 | - if ($_SERVER['HTTPS'] == "on") |
|
| 22 | - $url = "https://" . $url; |
|
| 23 | - else |
|
| 24 | - $url = "http://" . $url; |
|
| 21 | + if ($_SERVER['HTTPS'] == "on") { |
|
| 22 | + $url = "https://" . $url; |
|
| 23 | + } else { |
|
| 24 | + $url = "http://" . $url; |
|
| 25 | + } |
|
| 25 | 26 | |
| 26 | 27 | header("Location: $url"); |
| 27 | 28 | } else { |
@@ -31,10 +31,11 @@ |
||
| 31 | 31 | <?php |
| 32 | 32 | $remaining_attribs = $user->beginflushAttributes(); |
| 33 | 33 | |
| 34 | -if (isset($_POST['option'])) |
|
| 34 | +if (isset($_POST['option'])) { |
|
| 35 | 35 | foreach ($_POST['option'] as $opt_id => $optname) |
| 36 | 36 | if ($optname == "user:fedadmin") { |
| 37 | 37 | echo "Security violation: user tried to make himself federation administrator!"; |
| 38 | +} |
|
| 38 | 39 | exit(1); |
| 39 | 40 | } |
| 40 | 41 | ?> |
@@ -36,13 +36,15 @@ discard block |
||
| 36 | 36 | foreach (array_reverse($dn) as $k => $v) { |
| 37 | 37 | if(is_array ($v)) { |
| 38 | 38 | foreach ($v as $V) { |
| 39 | - if($out) |
|
| 40 | - $out .= ','; |
|
| 39 | + if($out) { |
|
| 40 | + $out .= ','; |
|
| 41 | + } |
|
| 41 | 42 | $out .= "$k=$V"; |
| 42 | 43 | } |
| 43 | 44 | } else { |
| 44 | - if($out) |
|
| 45 | - $out .= ','; |
|
| 45 | + if($out) { |
|
| 46 | + $out .= ','; |
|
| 47 | + } |
|
| 46 | 48 | $out .= "$k=$v"; |
| 47 | 49 | } |
| 48 | 50 | } |
@@ -61,8 +63,9 @@ discard block |
||
| 61 | 63 | $udp_result = $testsuite->UDP_reachability_result[$host]; |
| 62 | 64 | if(isset($udp_result['certdata']) && count($udp_result['certdata'])) { |
| 63 | 65 | foreach ($udp_result['certdata'] as $certdata) { |
| 64 | - if($certdata['type'] != 'server' && $certdata['type'] != 'totally_selfsigned' ) |
|
| 65 | - continue; |
|
| 66 | + if($certdata['type'] != 'server' && $certdata['type'] != 'totally_selfsigned' ) { |
|
| 67 | + continue; |
|
| 68 | + } |
|
| 66 | 69 | $server_cert = [ |
| 67 | 70 | 'subject' => printDN($certdata['subject']), |
| 68 | 71 | 'issuer' => printDN($certdata['issuer']), |
@@ -77,9 +80,9 @@ discard block |
||
| 77 | 80 | $ret['server_cert'] = $server_cert; |
| 78 | 81 | if(isset($udp_result['incoming_server_names'][0]) ) { |
| 79 | 82 | $ret['server'] = sprintf(_("Connected to %s."), $udp_result['incoming_server_names'][0]); |
| 83 | + } else { |
|
| 84 | + $ret['server'] = 0; |
|
| 80 | 85 | } |
| 81 | - else |
|
| 82 | - $ret['server'] = 0; |
|
| 83 | 86 | $ret['level'] = L_OK; |
| 84 | 87 | $ret['time_millisec'] = sprintf("%d", $udp_result['time_millisec']); |
| 85 | 88 | if (isset($udp_result['cert_oddities']) && count($udp_result['cert_oddities']) > 0) { |
@@ -100,8 +103,9 @@ discard block |
||
| 100 | 103 | return $ret; |
| 101 | 104 | } |
| 102 | 105 | |
| 103 | -if (!isset($_REQUEST['test_type']) || !$_REQUEST['test_type']) |
|
| 106 | +if (!isset($_REQUEST['test_type']) || !$_REQUEST['test_type']) { |
|
| 104 | 107 | exit; |
| 108 | +} |
|
| 105 | 109 | |
| 106 | 110 | $test_type = $_REQUEST['test_type']; |
| 107 | 111 | $check_realm = valid_Realm($_REQUEST['realm']); |
@@ -119,8 +123,9 @@ discard block |
||
| 119 | 123 | exit; |
| 120 | 124 | */ |
| 121 | 125 | $hostindex = $_REQUEST['hostindex']; |
| 122 | -if(!is_numeric($hostindex)) |
|
| 126 | +if(!is_numeric($hostindex)) { |
|
| 123 | 127 | exit; |
| 128 | +} |
|
| 124 | 129 | |
| 125 | 130 | |
| 126 | 131 | $returnarray = []; |
@@ -235,10 +240,11 @@ discard block |
||
| 235 | 240 | switch ($testresult) { |
| 236 | 241 | case RETVAL_CONVERSATION_REJECT: |
| 237 | 242 | $level = $returnarray['result'][$i]['level']; |
| 238 | - if($level > L_OK) |
|
| 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 | - else |
|
| 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."); |
|
| 243 | + if($level > L_OK) { |
|
| 244 | + $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]; |
|
| 245 | + } else { |
|
| 246 | + $message = _("<strong>Test successful</strong>: a bidirectional RADIUS conversation with multiple round-trips was carried out, and ended in an Access-Reject as planned."); |
|
| 247 | + } |
|
| 242 | 248 | break; |
| 243 | 249 | case RETVAL_IMMEDIATE_REJECT: |
| 244 | 250 | $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."); |
@@ -276,23 +282,28 @@ discard block |
||
| 276 | 282 | } else { |
| 277 | 283 | $returnarray['message'] = $testsuite->return_codes[$testsuite->TLS_CA_checks_result[$host]['status']]["message"]; |
| 278 | 284 | $returnarray['level'] = L_OK; |
| 279 | - if ($testsuite->TLS_CA_checks_result[$host]['status'] != RETVAL_CONNECTION_REFUSED) |
|
| 280 | - $returnarray['message'] .= ' (' . sprintf(_("elapsed time: %d"), $testsuite->TLS_CA_checks_result[$host]['time_millisec']) . ' ms)'; |
|
| 281 | - else |
|
| 282 | - $returnarray['level'] = L_ERROR; |
|
| 285 | + if ($testsuite->TLS_CA_checks_result[$host]['status'] != RETVAL_CONNECTION_REFUSED) { |
|
| 286 | + $returnarray['message'] .= ' (' . sprintf(_("elapsed time: %d"), $testsuite->TLS_CA_checks_result[$host]['time_millisec']) . ' ms)'; |
|
| 287 | + } else { |
|
| 288 | + $returnarray['level'] = L_ERROR; |
|
| 289 | + } |
|
| 283 | 290 | if ($testsuite->TLS_CA_checks_result[$host]['status'] == RETVAL_OK) { |
| 284 | 291 | $returnarray['certdata'] = []; |
| 285 | 292 | $returnarray['certdata']['subject'] = $testsuite->TLS_CA_checks_result[$host]['certdata']['subject']; |
| 286 | 293 | $returnarray['certdata']['issuer'] = $testsuite->TLS_CA_checks_result[$host]['certdata']['issuer']; |
| 287 | 294 | $returnarray['certdata']['extensions'] = []; |
| 288 | - if (isset($testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname'])) |
|
| 289 | - $returnarray['certdata']['extensions']['subjectaltname'] = $testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']; |
|
| 290 | - if (isset($testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['policyoid'])) |
|
| 291 | - $returnarray['certdata']['extensions']['policies'] = join(' ', $testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['policyoid']); |
|
| 292 | - if (isset($testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['crlDistributionPoint'])) |
|
| 293 | - $returnarray['certdata']['extensions']['crldistributionpoints'] = $testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['crlDistributionPoint']; |
|
| 294 | - if (isset($testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['authorityInfoAccess'])) |
|
| 295 | - $returnarray['certdata']['extensions']['authorityinfoaccess'] = $testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['authorityInfoAccess']; |
|
| 295 | + if (isset($testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname'])) { |
|
| 296 | + $returnarray['certdata']['extensions']['subjectaltname'] = $testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']; |
|
| 297 | + } |
|
| 298 | + if (isset($testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['policyoid'])) { |
|
| 299 | + $returnarray['certdata']['extensions']['policies'] = join(' ', $testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['policyoid']); |
|
| 300 | + } |
|
| 301 | + if (isset($testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['crlDistributionPoint'])) { |
|
| 302 | + $returnarray['certdata']['extensions']['crldistributionpoints'] = $testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['crlDistributionPoint']; |
|
| 303 | + } |
|
| 304 | + if (isset($testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['authorityInfoAccess'])) { |
|
| 305 | + $returnarray['certdata']['extensions']['authorityinfoaccess'] = $testsuite->TLS_CA_checks_result[$host]['certdata']['extensions']['authorityInfoAccess']; |
|
| 306 | + } |
|
| 296 | 307 | } |
| 297 | 308 | $returnarray['cert_oddities'] = []; |
| 298 | 309 | } |
@@ -306,10 +317,11 @@ discard block |
||
| 306 | 317 | $k = 0; |
| 307 | 318 | // the host member of the array may not exist if RETVAL_SKIPPED came out |
| 308 | 319 | // (e.g. no client cert to test with). Be prepared for that |
| 309 | - if (isset($testsuite->TLS_clients_checks_result[$host])) |
|
| 310 | - foreach ($testsuite->TLS_clients_checks_result[$host]['ca'] as $type => $cli) { |
|
| 320 | + if (isset($testsuite->TLS_clients_checks_result[$host])) { |
|
| 321 | + foreach ($testsuite->TLS_clients_checks_result[$host]['ca'] as $type => $cli) { |
|
| 311 | 322 | foreach ($cli as $key => $val) { |
| 312 | 323 | $returnarray['ca'][$k][$key] = $val; |
| 324 | + } |
|
| 313 | 325 | } |
| 314 | 326 | $k++; |
| 315 | 327 | } |
@@ -347,8 +359,9 @@ discard block |
||
| 347 | 359 | $oids = check_policy($data); |
| 348 | 360 | if (!empty($oids)) { |
| 349 | 361 | $printedres .= '<li>' . _("Certificate policies") . ':'; |
| 350 | - foreach ($oids as $k => $o) |
|
| 351 | - $printedres .= " $o ($k)"; |
|
| 362 | + foreach ($oids as $k => $o) { |
|
| 363 | + $printedres .= " $o ($k)"; |
|
| 364 | + } |
|
| 352 | 365 | } |
| 353 | 366 | if (($crl = certificate_get_field($data, 'crlDistributionPoints'))) { |
| 354 | 367 | $printedres .= '<li>' . _("crlDistributionPoints") . ': ' . $crl; |
@@ -23,10 +23,11 @@ discard block |
||
| 23 | 23 | $error_message =''; |
| 24 | 24 | $my_inst = valid_IdP($_REQUEST['inst_id'], $_SESSION['user']); |
| 25 | 25 | |
| 26 | -if (isset($_GET['profile_id'])) |
|
| 26 | +if (isset($_GET['profile_id'])) { |
|
| 27 | 27 | $my_profile = valid_Profile($_GET['profile_id'], $my_inst->identifier); |
| 28 | -else |
|
| 28 | +} else { |
|
| 29 | 29 | $my_profile = NULL; |
| 30 | +} |
|
| 30 | 31 | if ($my_profile != NULL) { |
| 31 | 32 | $cr = $my_profile->getAttributes("internal:realm"); |
| 32 | 33 | if ($cr) { |
@@ -43,16 +44,18 @@ discard block |
||
| 43 | 44 | $_SESSION['check_realm'] = $check_realm; |
| 44 | 45 | } |
| 45 | 46 | } else { |
| 46 | - if(!empty($_SESSION['check_realm'])) |
|
| 47 | - $check_realm = $_SESSION['check_realm']; |
|
| 48 | - else |
|
| 49 | - $check_realm = FALSE; |
|
| 47 | + if(!empty($_SESSION['check_realm'])) { |
|
| 48 | + $check_realm = $_SESSION['check_realm']; |
|
| 49 | + } else { |
|
| 50 | + $check_realm = FALSE; |
|
| 51 | + } |
|
| 52 | + } |
|
| 53 | + if($check_realm) { |
|
| 54 | + $testsuite = new RADIUSTests($check_realm); |
|
| 55 | + } else { |
|
| 56 | + $error_message = _("No valid realm name given, cannot execute any checks!"); |
|
| 57 | + } |
|
| 50 | 58 | } |
| 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 | -} |
|
| 56 | 59 | |
| 57 | 60 | $translate = _("STATIC"); |
| 58 | 61 | $translate = _("DYNAMIC"); |
@@ -433,10 +436,11 @@ discard block |
||
| 433 | 436 | $(".server_cert").hide(); |
| 434 | 437 | <?php |
| 435 | 438 | foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
| 436 | - if ($check_thorough) |
|
| 437 | - $extraarg = "profile_id: ".$my_profile->identifier.", "; |
|
| 438 | - else |
|
| 439 | - $extraarg = ""; |
|
| 439 | + if ($check_thorough) { |
|
| 440 | + $extraarg = "profile_id: ".$my_profile->identifier.", "; |
|
| 441 | + } else { |
|
| 442 | + $extraarg = ""; |
|
| 443 | + } |
|
| 440 | 444 | |
| 441 | 445 | print " |
| 442 | 446 | $(\"#src".$hostindex."_img\").attr('src',icon_loading); |
@@ -556,8 +560,9 @@ discard block |
||
| 556 | 560 | } else { |
| 557 | 561 | 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 | 562 | echo "</table><div class='notacceptable'><table>"; |
| 559 | - foreach ($testsuite->listerrors() as $details) |
|
| 560 | - echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
| 563 | + foreach ($testsuite->listerrors() as $details) { |
|
| 564 | + echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
| 565 | + } |
|
| 561 | 566 | echo "</table></div>"; |
| 562 | 567 | } |
| 563 | 568 | echo '</div>'; |
@@ -573,9 +578,13 @@ discard block |
||
| 573 | 578 | '; |
| 574 | 579 | foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
| 575 | 580 | $host = ''; |
| 576 | - if ($addr['family'] == "IPv6") $host .= '['; |
|
| 581 | + if ($addr['family'] == "IPv6") { |
|
| 582 | + $host .= '['; |
|
| 583 | + } |
|
| 577 | 584 | $host .= $addr['IP']; |
| 578 | - if ($addr['family'] == "IPv6") $host .= ']'; |
|
| 585 | + if ($addr['family'] == "IPv6") { |
|
| 586 | + $host .= ']'; |
|
| 587 | + } |
|
| 579 | 588 | $host .= ':' . $addr['port']; |
| 580 | 589 | /*if($addr['family'] == "IPv6") |
| 581 | 590 | continue;*/ |
@@ -728,11 +737,12 @@ discard block |
||
| 728 | 737 | echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
| 729 | 738 | } |
| 730 | 739 | // 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> |
|
| 740 | + if (in_array(EAP::$TLS, $prof_compl)) { |
|
| 741 | + echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr> |
|
| 733 | 742 | <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
| 734 | 743 | <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
| 735 | 744 | <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
| 745 | + } |
|
| 736 | 746 | echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>"; |
| 737 | 747 | echo "<div id='live_login_results' style='display:none'>"; |
| 738 | 748 | foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
@@ -762,13 +772,15 @@ discard block |
||
| 762 | 772 | var realm = '<?php echo $check_realm; ?>'; |
| 763 | 773 | run_udp(); |
| 764 | 774 | <?php |
| 765 | - if ($naptr > 0) |
|
| 766 | - echo "run_dynamic();"; |
|
| 767 | - else |
|
| 768 | - echo '$("#tabs-d-li").hide();'; |
|
| 769 | - if (!$check_thorough) |
|
| 770 | - echo '$("#tabs-through").hide();'; |
|
| 771 | -?> |
|
| 775 | + if ($naptr > 0) { |
|
| 776 | + echo "run_dynamic();"; |
|
| 777 | + } else { |
|
| 778 | + echo '$("#tabs-d-li").hide();'; |
|
| 779 | + } |
|
| 780 | + if (!$check_thorough) { |
|
| 781 | + echo '$("#tabs-through").hide();'; |
|
| 782 | + } |
|
| 783 | + ?> |
|
| 772 | 784 | </script> |
| 773 | 785 | <?php footer() ?> |
| 774 | 786 | |
@@ -74,8 +74,9 @@ discard block |
||
| 74 | 74 | $my_inst->commitFlushAttributes($killlist); |
| 75 | 75 | // delete cached logo, if present |
| 76 | 76 | $logofile = dirname(dirname(__FILE__)) . "/downloads/logos/" . $my_inst->identifier . ".png"; |
| 77 | -if (is_file($logofile)) |
|
| 77 | +if (is_file($logofile)) { |
|
| 78 | 78 | unlink($logofile); |
| 79 | +} |
|
| 79 | 80 | |
| 80 | 81 | CAT::writeAudit($_SESSION['user'], "MOD", "IdP " . $my_inst->identifier . " - attributes changed"); |
| 81 | 82 | |
@@ -87,27 +88,31 @@ discard block |
||
| 87 | 88 | |
| 88 | 89 | $ssids = []; |
| 89 | 90 | |
| 90 | -if (isset(Config::$CONSORTIUM['ssid']) && count(Config::$CONSORTIUM['ssid']) > 0) |
|
| 91 | +if (isset(Config::$CONSORTIUM['ssid']) && count(Config::$CONSORTIUM['ssid']) > 0) { |
|
| 91 | 92 | foreach (Config::$CONSORTIUM['ssid'] as $ssidname) |
| 92 | 93 | $ssids[] = $ssidname . " " . (isset(Config::$CONSORTIUM['tkipsupport']) && Config::$CONSORTIUM['tkipsupport'] === TRUE ? _("(WPA2/AES and WPA/TKIP)") : _("(WPA2/AES)") ); |
| 94 | +} |
|
| 93 | 95 | |
| 94 | 96 | $custom_ssids_wpa2 = $my_inst->getAttributes("media:SSID"); |
| 95 | 97 | $custom_ssids_wpa = $my_inst->getAttributes("media:SSID_with_legacy"); |
| 96 | 98 | $wired_support = $my_inst->getAttributes("media:wired"); |
| 97 | 99 | |
| 98 | -if (count($custom_ssids_wpa) > 0) |
|
| 100 | +if (count($custom_ssids_wpa) > 0) { |
|
| 99 | 101 | foreach ($custom_ssids_wpa as $ssidname) |
| 100 | 102 | $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES and WPA/TKIP)"); |
| 103 | +} |
|
| 101 | 104 | |
| 102 | -if (count($custom_ssids_wpa2) > 0) |
|
| 105 | +if (count($custom_ssids_wpa2) > 0) { |
|
| 103 | 106 | foreach ($custom_ssids_wpa2 as $ssidname) |
| 104 | 107 | $ssids[] = $ssidname['value'] . " " . _("(WPA2/AES)"); |
| 108 | +} |
|
| 105 | 109 | |
| 106 | 110 | echo "<table>"; |
| 107 | 111 | if (count($ssids) > 0) { |
| 108 | 112 | $printedlist = ""; |
| 109 | - foreach ($ssids as $names) |
|
| 110 | - $printedlist = $printedlist . "$names "; |
|
| 113 | + foreach ($ssids as $names) { |
|
| 114 | + $printedlist = $printedlist . "$names "; |
|
| 115 | + } |
|
| 111 | 116 | echo UI_okay(sprintf(_("Your installers will configure the following SSIDs: <strong>%s</strong>"), $printedlist), _("SSIDs configured")); |
| 112 | 117 | }; |
| 113 | 118 | if (count($wired_support) > 0) { |
@@ -54,7 +54,8 @@ |
||
| 54 | 54 | CAT::writeAudit($_SESSION['user'], "MOD", "IdP " . $newidp->identifier . " - Token used and invalidated"); |
| 55 | 55 | }; |
| 56 | 56 | } |
| 57 | -if ($checkval == "OK-EXISTING") |
|
| 57 | +if ($checkval == "OK-EXISTING") { |
|
| 58 | 58 | header("Location: overview_user.php"); |
| 59 | -else |
|
| 59 | +} else { |
|
| 60 | 60 | header("Location: edit_idp.php?inst_id=$newidp->identifier&wizard=true"); |
| 61 | +} |
|
@@ -54,22 +54,26 @@ discard block |
||
| 54 | 54 | </div> |
| 55 | 55 | <div> |
| 56 | 56 | <?php |
| 57 | - if (!Config::$DB['userdb-readonly']) |
|
| 58 | - echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>"; |
|
| 57 | + if (!Config::$DB['userdb-readonly']) { |
|
| 58 | + echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>"; |
|
| 59 | + } |
|
| 59 | 60 | |
| 60 | - if ($user->isFederationAdmin()) |
|
| 61 | - echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to manage your federations') . "</button></form>"; |
|
| 62 | - if ($user->isSuperadmin()) |
|
| 63 | - echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; |
|
| 61 | + if ($user->isFederationAdmin()) { |
|
| 62 | + echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to manage your federations') . "</button></form>"; |
|
| 63 | + } |
|
| 64 | + if ($user->isSuperadmin()) { |
|
| 65 | + echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; |
|
| 66 | + } |
|
| 64 | 67 | ?> |
| 65 | 68 | </div> |
| 66 | 69 | <?php |
| 67 | 70 | $has_inst = $inst_mgmt->listInstitutionsByAdmin($_SESSION['user']); |
| 68 | 71 | |
| 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>"; |
|
| 71 | - else |
|
| 72 | - $helptext = ""; |
|
| 72 | + if (Config::$CONSORTIUM['name'] == 'eduroam') { |
|
| 73 | + $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>"; |
|
| 74 | + } else { |
|
| 75 | + $helptext = ""; |
|
| 76 | + } |
|
| 73 | 77 | |
| 74 | 78 | if (sizeof($has_inst) > 0) { |
| 75 | 79 | // we need to run the Federation constructor |
@@ -121,25 +125,27 @@ discard block |
||
| 121 | 125 | } |
| 122 | 126 | } else { // don't list self |
| 123 | 127 | unset($admins[$number]); |
| 124 | - if ($username['LEVEL'] == "FED") |
|
| 125 | - $i_am_blessed = TRUE; |
|
| 128 | + if ($username['LEVEL'] == "FED") { |
|
| 129 | + $i_am_blessed = TRUE; |
|
| 130 | + } |
|
| 126 | 131 | } |
| 127 | 132 | } |
| 128 | 133 | $number_of_other_admins = count($admins); // only the unnamed remain |
| 129 | - if ($number_of_other_admins > 0) |
|
| 130 | - echo ngettext("other user", "other users", $number_of_other_admins); |
|
| 134 | + if ($number_of_other_admins > 0) { |
|
| 135 | + echo ngettext("other user", "other users", $number_of_other_admins); |
|
| 136 | + } |
|
| 131 | 137 | // foreach ($the_inst->owner() as $admin) |
| 132 | 138 | // if ($admin != $_SESSION['user']) |
| 133 | 139 | // echo $admin . "<br/>"; |
| 134 | 140 | echo "</td><td>"; |
| 135 | - if ($i_am_blessed) |
|
| 136 | - echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>"; |
|
| 141 | + if ($i_am_blessed) { |
|
| 142 | + echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>"; |
|
| 143 | + } |
|
| 137 | 144 | echo "</td></tr>"; |
| 138 | 145 | } |
| 139 | 146 | } |
| 140 | 147 | echo "</table>"; |
| 141 | - } |
|
| 142 | - else { |
|
| 148 | + } else { |
|
| 143 | 149 | echo "<h2>" . _("You are not managing any institutions.") . "</h2>"; |
| 144 | 150 | }; |
| 145 | 151 | if (Config::$CONSORTIUM['selfservice_registration'] === NULL) { |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | } else { |
| 126 | 126 | echo "<td class='compat_secondary'></td>"; |
| 127 | 127 | } |
| 128 | + } else { |
|
| 129 | + echo "<td class='compat_unsupported'></td>"; |
|
| 128 | 130 | } |
| 129 | - else |
|
| 130 | - echo "<td class='compat_unsupported'></td>"; |
|
| 131 | 131 | } |
| 132 | 132 | echo "</tr>"; |
| 133 | 133 | } |
@@ -144,8 +144,9 @@ discard block |
||
| 144 | 144 | <?php |
| 145 | 145 | if (count($footnotes)) { |
| 146 | 146 | echo "<p><strong>" . _("Footnotes:") . "</strong></p><table>"; |
| 147 | - foreach ($footnotes as $number => $text) |
|
| 148 | - echo "<tr><td>($number) - </td><td>$text</td></tr>"; |
|
| 147 | + foreach ($footnotes as $number => $text) { |
|
| 148 | + echo "<tr><td>($number) - </td><td>$text</td></tr>"; |
|
| 149 | + } |
|
| 149 | 150 | echo "</table>"; |
| 150 | 151 | } |
| 151 | 152 | ?> |