@@ -162,7 +162,7 @@ |
||
162 | 162 | $profileFileCont .= ' |
163 | 163 | </ServerSideCredential> |
164 | 164 | <InnerAuthenticationMethod> |
165 | -<NonEAPAuthMethod>' .$innerMethod. '</NonEAPAuthMethod> |
|
165 | +<NonEAPAuthMethod>' .$innerMethod . '</NonEAPAuthMethod> |
|
166 | 166 | </InnerAuthenticationMethod> |
167 | 167 | <VendorSpecific> |
168 | 168 | <SessionResumption>false</SessionResumption> |
@@ -10,7 +10,7 @@ |
||
10 | 10 | */ |
11 | 11 | require_once(dirname(dirname(__DIR__)) . "/config/_config.php"); |
12 | 12 | $realm = filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING); |
13 | -$visited = filter_input(INPUT_GET,'visited', FILTER_SANITIZE_STRING); |
|
13 | +$visited = filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING); |
|
14 | 14 | if (session_status != PHP_SESSION_ACTIVE) { |
15 | 15 | session_start(); |
16 | 16 | } |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | * |
17 | 17 | * @package Developer |
18 | 18 | */ |
19 | -function check_my_nonce($nonce, $optSalt='') { |
|
19 | +function check_my_nonce($nonce, $optSalt = '') { |
|
20 | 20 | $remote = filter_input(INPUT_SERVER, 'REMOTE_ADDR'); |
21 | - $lasthour = date("G")-1<0 ? date('Ymd').'23' : date("YmdG")-1; |
|
22 | - if (hash_hmac('sha256', session_id().$optSalt, date("YmdG").'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce || |
|
23 | - hash_hmac('sha256', session_id().$optSalt, $lasthour.'1qaz2wsx3edc!QAZ@WSX#EDC'.$remote) == $nonce) { |
|
21 | + $lasthour = date("G") - 1 < 0 ? date('Ymd') . '23' : date("YmdG") - 1; |
|
22 | + if (hash_hmac('sha256', session_id() . $optSalt, date("YmdG") . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce || |
|
23 | + hash_hmac('sha256', session_id() . $optSalt, $lasthour . '1qaz2wsx3edc!QAZ@WSX#EDC' . $remote) == $nonce) { |
|
24 | 24 | return true; |
25 | 25 | } else { |
26 | 26 | return false; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | foreach ($details['admins'] as $admin) { |
53 | 53 | $admins[] = $admin['email']; |
54 | 54 | } |
55 | - $details['admins'] = base64_encode(join(',',$admins)); |
|
55 | + $details['admins'] = base64_encode(join(',', $admins)); |
|
56 | 56 | } else { |
57 | 57 | $details['admins'] = ''; |
58 | 58 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $details = $cat->getExternalDBEntityDetails($realmOu); |
87 | 87 | if (!empty($details)) { |
88 | 88 | $returnArray['status'] = 1; |
89 | - $returnArray['realms'] = explode(',',$details['realmlist']); |
|
89 | + $returnArray['realms'] = explode(',', $details['realmlist']); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | // if we have a pushed close button, submit attributes and send user back to the overview page |
26 | 26 | // if external DB sync is disabled globally, the user never gets to this page. If he came here *anyway* -> send him back immediately. |
27 | -if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE ) || CONFIG['DB']['enforce-external-sync'] == FALSE) { |
|
27 | +if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE) || CONFIG['DB']['enforce-external-sync'] == FALSE) { |
|
28 | 28 | header("Location: ../overview_federation.php"); |
29 | 29 | exit; |
30 | 30 | } |
@@ -159,7 +159,7 @@ |
||
159 | 159 | |
160 | 160 | echo "</td> |
161 | 161 | <td> |
162 | - <form action='inc/manageAdmins.inc.php?inst_id=" . $my_inst->identifier . "' method='post' " . ( $oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "" ) . " accept-charset='UTF-8'> |
|
162 | + <form action='inc/manageAdmins.inc.php?inst_id=" . $my_inst->identifier . "' method='post' " . ($oneowner['ID'] != $_SESSION['user'] ? "onsubmit='popupRedirectWindow(this); return false;'" : "") . " accept-charset='UTF-8'> |
|
163 | 163 | <input type='hidden' name='admin_id' value='" . $oneowner['ID'] . "'></input> |
164 | 164 | <button type='submit' name='submitbutton' class='delete' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Delete Administrator") . "</button> |
165 | 165 | </form> |
@@ -191,7 +191,7 @@ |
||
191 | 191 | case "SILVERBULLET": |
192 | 192 | $theProfile = new ProfileSilverbullet($identifier, $this); |
193 | 193 | $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1); |
194 | - $theProfile->setRealm($this->identifier."-".$theProfile->identifier."." . strtolower($this->federation) . strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix'])); |
|
194 | + $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(CONFIG_CONFASSISTANT['SILVERBULLET']['realm_suffix'])); |
|
195 | 195 | return $theProfile; |
196 | 196 | default: |
197 | 197 | throw new Exception("This type of profile is unknown and can not be added."); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | <div class='infobox' style='text-align:center;'> |
57 | 57 | <h2><?php echo sprintf(_("QR Code for %s download area"), $uiElements->nomenclature_inst); ?></h2> |
58 | 58 | <?php |
59 | - $displayurl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
59 | + $displayurl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier; |
|
60 | 60 | $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo(QRcode::png($displayurl, FALSE, QR_ECLEVEL_Q, QRCODE_PIXELS_PER_SYMBOL), QRCODE_PIXELS_PER_SYMBOL)); |
61 | 61 | $size = getimagesize($uri); |
62 | 62 | echo "<img width='" . ($size[0] / 4) . "' height='" . ($size[1] / 4) . "' src='$uri' alt='QR-code'/>"; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | </td> |
94 | 94 | <td> |
95 | 95 | <form action='edit_idp_result.php?inst_id=<?php echo $my_inst->identifier; ?>' method='post' accept-charset='UTF-8'> |
96 | - <button class='delete' type='submit' name='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo ( CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL ? sprintf(_("After deleting the IdP, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclature_fed) . " " : "" ) . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclature_inst, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclature_inst); ?></button> |
|
96 | + <button class='delete' type='submit' name='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo (CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL ? sprintf(_("After deleting the IdP, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclature_fed) . " " : "") . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclature_inst, $my_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclature_inst); ?></button> |
|
97 | 97 | </form> |
98 | 98 | |
99 | 99 | </td> |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | if ($readonly === FALSE) { |
182 | 182 | ?> |
183 | 183 | <form action='edit_silverbullet.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $profile_list->identifier; ?>' method='POST'> |
184 | - <button <?php echo ( is_array($completeness) ? "disabled" : "" ); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
184 | + <button <?php echo (is_array($completeness) ? "disabled" : ""); ?> type='submit' name='sb_action' value='sb_edit'><?php echo _("Manage User Base"); ?></button> |
|
185 | 185 | </form> |
186 | 186 | <?php |
187 | 187 | } |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | if (isset($URL['device-specific:redirect'])) { |
316 | 316 | $displayurl = $URL['device-specific:redirect'][0]; |
317 | 317 | } else { |
318 | - $displayurl = ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier . "&profile=" . $profile_list->identifier; |
|
318 | + $displayurl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on" ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . dirname(dirname($_SERVER['SCRIPT_NAME'])) . "?idp=" . $my_inst->identifier . "&profile=" . $profile_list->identifier; |
|
319 | 319 | } |
320 | 320 | echo "<a href='$displayurl' style='white-space: nowrap; text-align: center;'>"; |
321 | 321 | $uri = "data:image/png;base64," . base64_encode($uiElements->pngInjectConsortiumLogo(QRcode::png($displayurl, FALSE, QR_ECLEVEL_Q, QRCODE_PIXELS_PER_SYMBOL), QRCODE_PIXELS_PER_SYMBOL)); |
@@ -98,7 +98,7 @@ |
||
98 | 98 | $country[$key] = $row['country']; |
99 | 99 | $name[$key] = $row['name']; |
100 | 100 | } |
101 | - echo "<tr><th>" . sprintf(_("%s Name"), $uiElements->nomenclature_inst) . "</th><th>" . sprintf(_("Other admins of this %s"), $uiElements->nomenclature_inst) . "</th><th>" . ( CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "") . "</th></tr>"; |
|
101 | + echo "<tr><th>" . sprintf(_("%s Name"), $uiElements->nomenclature_inst) . "</th><th>" . sprintf(_("Other admins of this %s"), $uiElements->nomenclature_inst) . "</th><th>" . (CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "") . "</th></tr>"; |
|
102 | 102 | foreach ($myFeds as $fed_id => $fed_name) { |
103 | 103 | echo "<tr><td colspan='3'><strong>" . sprintf(_("%s %s: %s list"), $uiElements->nomenclature_fed, $fed_name, $uiElements->nomenclature_inst) . "</strong></td></tr>"; |
104 | 104 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | 'mailer', |
29 | 29 | ]; |
30 | 30 | |
31 | -if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL" ) { |
|
31 | +if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL" || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == "LOCAL") { |
|
32 | 32 | $Tests[] = 'makensis'; |
33 | 33 | $Tests[] = 'makensis=>NSISmodules'; |
34 | 34 | } |