@@ -83,7 +83,7 @@ |
||
83 | 83 | */ |
84 | 84 | public function htmlShowtime($wizard = FALSE, $additional = FALSE) { |
85 | 85 | if (!$this->readOnly) { |
86 | - // return $this->htmlPreEdit($wizard, $additional) . $this->htmlPostEdit(TRUE); |
|
86 | + // return $this->htmlPreEdit($wizard, $additional) . $this->htmlPostEdit(TRUE); |
|
87 | 87 | return $this->htmlPreEdit($wizard, $additional) . $this->findLocationHtml() . $this->htmlPostEdit(TRUE); |
88 | 88 | } |
89 | 89 | } |
@@ -156,7 +156,7 @@ |
||
156 | 156 | echo "0\">"; |
157 | 157 | echo _("This service is for authenticated admins only.") . '<br>'; |
158 | 158 | echo "<a href=\"diag.php?admin=1\">" . |
159 | - _("eduroam® admin access is needed") . "</a>"; |
|
159 | + _("eduroam® admin access is needed") . "</a>"; |
|
160 | 160 | } |
161 | 161 | ?> |
162 | 162 | </div> |
@@ -211,7 +211,7 @@ |
||
211 | 211 | } |
212 | 212 | |
213 | 213 | if (!empty($this->attributes['internal:realm'][0])) { |
214 | - $config['user_realm'] = $this->attributes['internal:realm'][0]; |
|
214 | + $config['user_realm'] = $this->attributes['internal:realm'][0]; |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
@@ -22,15 +22,15 @@ |
||
22 | 22 | namespace devices\redirect_dev; |
23 | 23 | |
24 | 24 | class DeviceRedirectDev extends \core\DeviceConfig { |
25 | - /** |
|
26 | - * Constructs a Device object. |
|
27 | - * |
|
28 | - * @final not to be redefined |
|
29 | - */ |
|
25 | + /** |
|
26 | + * Constructs a Device object. |
|
27 | + * |
|
28 | + * @final not to be redefined |
|
29 | + */ |
|
30 | 30 | final public function __construct() { |
31 | 31 | parent::__construct(); |
32 | - $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
|
33 | - $this->loggerInstance->debug(4,"RedirectEx called"); |
|
32 | + $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
|
33 | + $this->loggerInstance->debug(4,"RedirectEx called"); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -91,7 +91,7 @@ |
||
91 | 91 | <?php if (empty($_REQUEST['idp'])) { ?> |
92 | 92 | <div id="front_page"> |
93 | 93 | <?php |
94 | - echo $divs->divTopWelcome(); |
|
94 | + echo $divs->divTopWelcome(); |
|
95 | 95 | // echo $divs->div_roller(); |
96 | 96 | // echo $divs->div_main_button(); ?> |
97 | 97 | </div> <!-- id="front_page" --> |
@@ -1115,12 +1115,12 @@ |
||
1115 | 1115 | $certUsernameLabel = WindowsCommon::sprintNsis(_("Username:")); |
1116 | 1116 | $certUsernameLength = strlen($certUsernameLabel); |
1117 | 1117 | $labelLength = max($certPasswordLength,$certUsernameLength); |
1118 | - ?> |
|
1118 | + ?> |
|
1119 | 1119 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echoNsis(_("Selected file: \$Cert_file"))?>" |
1120 | 1120 | !else |
1121 | 1121 | <?php $certPasswordLabel = WindowsCommon::sprintNsis(_("import password:")); |
1122 | 1122 | $certPasswordLength = strlen($certPasswordLabel); |
1123 | - ?> |
|
1123 | + ?> |
|
1124 | 1124 | !insertmacro debug_cat 4 "Unpacking SB_cert.p12" |
1125 | 1125 | File "SB_cert.p12" |
1126 | 1126 | nsArray::Set Delete_files "SB_cert.p12" |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $caEngine->triggerNewOCSPStatement(/** @scrutinizer ignore-type */ $certObject->serial); |
45 | 45 | } |
46 | 46 | |
47 | - /* |
|
47 | + /* |
|
48 | 48 | * and then writes all recently updated statements to a temporary directory. The |
49 | 49 | * calling script ocsp_update.sh should then scp all the files to their |
50 | 50 | * destination. |
@@ -72,96 +72,96 @@ |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | switch ($operationMode) { |
75 | - case OPERATION_MODE_EDIT: |
|
76 | - $idp = $validator->existingIdP($_GET['inst_id']); |
|
77 | - // editing IdPs is done from within the popup. When we're done, send the |
|
78 | - // user back to the popup (append the result of the operation later) |
|
79 | - $redirectDestination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
80 | - if (count($validAddresses) == 0) { |
|
81 | - header("Location: $redirectDestination" . "invitation=INVALIDSYNTAX"); |
|
82 | - exit(1); |
|
83 | - } |
|
84 | - // is the user primary admin of this IdP? |
|
85 | - $is_owner = $idp->isPrimaryOwner($_SESSION['user']); |
|
86 | - // check if he is (also) federation admin for the federation this IdP is in. His invitations have more blessing then. |
|
87 | - $fedadmin = $userObject->isFederationAdmin($idp->federation); |
|
88 | - // check if he is either one, if not, complain |
|
89 | - if (!$is_owner && !$fedadmin) { |
|
90 | - echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; |
|
91 | - exit(1); |
|
92 | - } |
|
75 | + case OPERATION_MODE_EDIT: |
|
76 | + $idp = $validator->existingIdP($_GET['inst_id']); |
|
77 | + // editing IdPs is done from within the popup. When we're done, send the |
|
78 | + // user back to the popup (append the result of the operation later) |
|
79 | + $redirectDestination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
80 | + if (count($validAddresses) == 0) { |
|
81 | + header("Location: $redirectDestination" . "invitation=INVALIDSYNTAX"); |
|
82 | + exit(1); |
|
83 | + } |
|
84 | + // is the user primary admin of this IdP? |
|
85 | + $is_owner = $idp->isPrimaryOwner($_SESSION['user']); |
|
86 | + // check if he is (also) federation admin for the federation this IdP is in. His invitations have more blessing then. |
|
87 | + $fedadmin = $userObject->isFederationAdmin($idp->federation); |
|
88 | + // check if he is either one, if not, complain |
|
89 | + if (!$is_owner && !$fedadmin) { |
|
90 | + echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; |
|
91 | + exit(1); |
|
92 | + } |
|
93 | 93 | |
94 | - $prettyprintname = $idp->name; |
|
95 | - $newtokens = $mgmt->createTokens($fedadmin, $validAddresses, $idp); |
|
96 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $validAddresses)); |
|
97 | - $introtext = "CO-ADMIN"; |
|
98 | - $participant_type = $idp->type; |
|
99 | - break; |
|
100 | - case OPERATION_MODE_NEWUNLINKED: |
|
101 | - $redirectDestination = "../overview_federation.php?"; |
|
102 | - if (count($validAddresses) == 0) { |
|
103 | - header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
104 | - exit(1); |
|
105 | - } |
|
106 | - // run an input check and conversion of the raw inputs... just in case |
|
107 | - $newinstname = $validator->string($_POST['name']); |
|
108 | - $newcountry = $validator->string($_POST['country']); |
|
109 | - $participant_type = $validator->partType($_POST['participant_type']); |
|
110 | - $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
|
111 | - if ($new_idp_authorized_fedadmin !== TRUE) { |
|
112 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
113 | - } |
|
114 | - $federation = $validator->existingFederation($newcountry); |
|
115 | - $prettyprintname = $newinstname; |
|
116 | - $introtext = "NEW-FED"; |
|
117 | - // send the user back to his federation overview page, append the result of the operation later |
|
118 | - // do the token creation magic |
|
119 | - $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $newinstname, 0, $newcountry, $participant_type); |
|
120 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type " . implode(",", $validAddresses)); |
|
121 | - break; |
|
122 | - case OPERATION_MODE_NEWFROMDB: |
|
123 | - $redirectDestination = "../overview_federation.php?"; |
|
124 | - if (count($validAddresses) == 0) { |
|
125 | - header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
126 | - exit(1); |
|
127 | - } |
|
128 | - // a real external DB entry was submitted and all the required parameters are there |
|
129 | - $newexternalid = $validator->string($_POST['externals']); |
|
130 | - $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid); |
|
131 | - $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
|
132 | - if ($new_idp_authorized_fedadmin !== TRUE) { |
|
133 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
134 | - } |
|
135 | - $federation = $validator->existingFederation($extinfo['country']); |
|
136 | - $newcountry = $extinfo['country']; |
|
137 | - // see if the inst name is defined in the currently set language; if not, pick its English name; if N/A, pick the last in the list |
|
138 | - $prettyprintname = ""; |
|
139 | - foreach ($extinfo['names'] as $lang => $name) { |
|
140 | - if ($lang == $languageInstance->getLang()) { |
|
141 | - $prettyprintname = $name; |
|
94 | + $prettyprintname = $idp->name; |
|
95 | + $newtokens = $mgmt->createTokens($fedadmin, $validAddresses, $idp); |
|
96 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $validAddresses)); |
|
97 | + $introtext = "CO-ADMIN"; |
|
98 | + $participant_type = $idp->type; |
|
99 | + break; |
|
100 | + case OPERATION_MODE_NEWUNLINKED: |
|
101 | + $redirectDestination = "../overview_federation.php?"; |
|
102 | + if (count($validAddresses) == 0) { |
|
103 | + header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
104 | + exit(1); |
|
142 | 105 | } |
143 | - } |
|
144 | - if ($prettyprintname == "" && isset($extinfo['names']['en'])) { |
|
145 | - $prettyprintname = $extinfo['names']['en']; |
|
146 | - } |
|
147 | - if ($prettyprintname == "") { |
|
148 | - foreach ($extinfo['names'] as $name) { |
|
149 | - $prettyprintname = $name; |
|
106 | + // run an input check and conversion of the raw inputs... just in case |
|
107 | + $newinstname = $validator->string($_POST['name']); |
|
108 | + $newcountry = $validator->string($_POST['country']); |
|
109 | + $participant_type = $validator->partType($_POST['participant_type']); |
|
110 | + $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
|
111 | + if ($new_idp_authorized_fedadmin !== TRUE) { |
|
112 | + throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
150 | 113 | } |
151 | - } |
|
152 | - $participant_type = $extinfo['type']; |
|
153 | - // fill the rest of the text |
|
154 | - $introtext = "EXISTING-FED"; |
|
155 | - // do the token creation magic |
|
156 | - $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $prettyprintname, $newexternalid); |
|
157 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $validAddresses)); |
|
158 | - break; |
|
159 | - default: // includes OPERATION_MODE_INVALID |
|
160 | - $wrongcontent = print_r($_POST, TRUE); |
|
161 | - echo "<pre>Wrong parameters in POST: |
|
114 | + $federation = $validator->existingFederation($newcountry); |
|
115 | + $prettyprintname = $newinstname; |
|
116 | + $introtext = "NEW-FED"; |
|
117 | + // send the user back to his federation overview page, append the result of the operation later |
|
118 | + // do the token creation magic |
|
119 | + $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $newinstname, 0, $newcountry, $participant_type); |
|
120 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type " . implode(",", $validAddresses)); |
|
121 | + break; |
|
122 | + case OPERATION_MODE_NEWFROMDB: |
|
123 | + $redirectDestination = "../overview_federation.php?"; |
|
124 | + if (count($validAddresses) == 0) { |
|
125 | + header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
126 | + exit(1); |
|
127 | + } |
|
128 | + // a real external DB entry was submitted and all the required parameters are there |
|
129 | + $newexternalid = $validator->string($_POST['externals']); |
|
130 | + $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid); |
|
131 | + $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
|
132 | + if ($new_idp_authorized_fedadmin !== TRUE) { |
|
133 | + throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
134 | + } |
|
135 | + $federation = $validator->existingFederation($extinfo['country']); |
|
136 | + $newcountry = $extinfo['country']; |
|
137 | + // see if the inst name is defined in the currently set language; if not, pick its English name; if N/A, pick the last in the list |
|
138 | + $prettyprintname = ""; |
|
139 | + foreach ($extinfo['names'] as $lang => $name) { |
|
140 | + if ($lang == $languageInstance->getLang()) { |
|
141 | + $prettyprintname = $name; |
|
142 | + } |
|
143 | + } |
|
144 | + if ($prettyprintname == "" && isset($extinfo['names']['en'])) { |
|
145 | + $prettyprintname = $extinfo['names']['en']; |
|
146 | + } |
|
147 | + if ($prettyprintname == "") { |
|
148 | + foreach ($extinfo['names'] as $name) { |
|
149 | + $prettyprintname = $name; |
|
150 | + } |
|
151 | + } |
|
152 | + $participant_type = $extinfo['type']; |
|
153 | + // fill the rest of the text |
|
154 | + $introtext = "EXISTING-FED"; |
|
155 | + // do the token creation magic |
|
156 | + $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $prettyprintname, $newexternalid); |
|
157 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $validAddresses)); |
|
158 | + break; |
|
159 | + default: // includes OPERATION_MODE_INVALID |
|
160 | + $wrongcontent = print_r($_POST, TRUE); |
|
161 | + echo "<pre>Wrong parameters in POST: |
|
162 | 162 | " . htmlspecialchars($wrongcontent) . " |
163 | 163 | </pre>"; |
164 | - exit(1); |
|
164 | + exit(1); |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | // send, and invalidate the token immediately if the mail could not be sent! |
@@ -49,14 +49,14 @@ |
||
49 | 49 | } |
50 | 50 | |
51 | 51 | switch ($_GET['token']) { |
52 | - case "SELF-REGISTER": |
|
53 | - $token = "SELF-REGISTER"; |
|
54 | - $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
|
55 | - $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration']; |
|
56 | - break; |
|
57 | - default: |
|
58 | - $token = $validator->token(filter_input(INPUT_GET,'token',FILTER_SANITIZE_STRING)); |
|
59 | - $checkval = $usermgmt->checkTokenValidity($token); |
|
52 | + case "SELF-REGISTER": |
|
53 | + $token = "SELF-REGISTER"; |
|
54 | + $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
|
55 | + $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration']; |
|
56 | + break; |
|
57 | + default: |
|
58 | + $token = $validator->token(filter_input(INPUT_GET,'token',FILTER_SANITIZE_STRING)); |
|
59 | + $checkval = $usermgmt->checkTokenValidity($token); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | if ($checkval < 0) { |