@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | 'bg' => ['display' => 'Български', 'locale' => 'bg_BG.utf8', 'latin_based' => FALSE, 'rtl' => FALSE], |
175 | 175 | 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
176 | 176 | 'cs' => ['display' => 'Čeština', 'locale' => 'cs_CZ.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
177 | - 'cy' => ['display' => 'Cymraeg', 'locale' => 'cy_GB.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
|
177 | + 'cy' => ['display' => 'Cymraeg', 'locale' => 'cy_GB.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
|
178 | 178 | 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
179 | 179 | 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE, 'rtl' => FALSE], |
180 | 180 | 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE, 'rtl' => FALSE], |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | 'db' => 'cat', |
222 | 222 | 'user' => 'kitty', |
223 | 223 | 'pass' => 'somepass', |
224 | - 'readonly' => FALSE,], |
|
224 | + 'readonly' => FALSE, ], |
|
225 | 225 | // this DB stores diagnostics data. The connection details can be |
226 | 226 | // identical to INST as there is no table overlap |
227 | 227 | 'DIAGNOSTICS' => [ |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | 'db' => 'cat', |
230 | 230 | 'user' => 'kitty', |
231 | 231 | 'pass' => 'somepass', |
232 | - 'readonly' => FALSE,], |
|
232 | + 'readonly' => FALSE, ], |
|
233 | 233 | // this slice of DB user is about the downloads table. The corresponding |
234 | 234 | // DB user should have write access to update statistics and the cache |
235 | 235 | // locations of installers. |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | 'db' => 'cat', |
240 | 240 | 'user' => 'kitty', |
241 | 241 | 'pass' => 'somepass', |
242 | - 'readonly' => FALSE,], |
|
242 | + 'readonly' => FALSE, ], |
|
243 | 243 | // this slice of DB use is about user management in the user_options |
244 | 244 | // table. Giving the corresponding user only read-only access means that |
245 | 245 | // all user properties have to "magically" occur in the table by OOB |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | 'db' => 'cat', |
251 | 251 | 'user' => 'kitty', |
252 | 252 | 'pass' => 'somepass', |
253 | - 'readonly' => FALSE,], |
|
253 | + 'readonly' => FALSE, ], |
|
254 | 254 | /* If you use this tool in conjunction with an external customer management database, you can configure that every |
255 | 255 | * institution entry in CAT MUST correspond to a customer entry in an external database. If you want this, set this |
256 | 256 | * config variable to TRUE. |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | 'db' => 'customer_db', |
277 | 277 | 'user' => 'customerservice', |
278 | 278 | 'pass' => '2lame4u', |
279 | - 'readonly' => TRUE,], |
|
279 | + 'readonly' => TRUE, ], |
|
280 | 280 | /* |
281 | 281 | * EXTERNAL_SOURCE is the source only used in the caching script, if you |
282 | 282 | * do not use local caching then these settings are irrelevant |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | 'db' => 'customer_db', |
287 | 287 | 'user' => 'customerservice', |
288 | 288 | 'pass' => '2lame4u', |
289 | - 'readonly' => TRUE,], |
|
289 | + 'readonly' => TRUE, ], |
|
290 | 290 | |
291 | 291 | 'enforce-external-sync' => TRUE, |
292 | 292 | ]; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | */ |
28 | 28 | ?> |
29 | 29 | <?php |
30 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
30 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
31 | 31 | $auth = new \web\lib\admin\Authentication(); |
32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
33 | 33 | $validator = new \web\lib\common\InputValidation(); |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | $fed = $validator->existingFederation($_POST['NRO-list']); |
106 | 106 | $country = strtoupper($fed->tld); |
107 | 107 | $DN[] = "C=$country"; |
108 | - $DN[] = "O=NRO of " . iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[strtoupper($fed->tld)]); |
|
108 | + $DN[] = "O=NRO of ".iconv('UTF-8', 'ASCII//TRANSLIT', $cat->knownFederations[strtoupper($fed->tld)]); |
|
109 | 109 | $serverInfo = $externalDb->listExternalTlsServersFederation($fed->tld); |
110 | 110 | $serverList = explode(",", array_key_first($serverInfo)); |
111 | - $DN[] = "CN=" . $serverList[0]; |
|
111 | + $DN[] = "CN=".$serverList[0]; |
|
112 | 112 | $policies[] = "eduroam IdP"; |
113 | 113 | $policies[] = "eduroam SP"; |
114 | 114 | $firstName = $serverInfo[array_key_first($serverInfo)][0]["name"]; |
@@ -135,14 +135,14 @@ discard block |
||
135 | 135 | $modou = 1; |
136 | 136 | $ou = str_replace(",", "/,", $ou); |
137 | 137 | } |
138 | - $ou = preg_replace('/\s+/', ' ', $ou); |
|
138 | + $ou = preg_replace('/\s+/', ' ', $ou); |
|
139 | 139 | if (strlen($ou) >= 64) { |
140 | 140 | $ou = substr($ou, 0, 64); |
141 | 141 | $modou += 2; |
142 | 142 | } |
143 | 143 | $DN[] = "O=".iconv('UTF-8', 'ASCII//TRANSLIT', $ou); |
144 | 144 | $serverList = explode(",", $serverInfo["servers"]); |
145 | - $DN[] = "CN=" . $serverList[0]; |
|
145 | + $DN[] = "CN=".$serverList[0]; |
|
146 | 146 | switch ($serverInfo["type"]) { |
147 | 147 | case core\IdP::TYPE_IDPSP: |
148 | 148 | $policies[] = "eduroam IdP"; |
@@ -161,13 +161,13 @@ discard block |
||
161 | 161 | default: |
162 | 162 | throw new Exception("Sorry: Unknown level of issuance requested."); |
163 | 163 | } |
164 | - echo "<p style='font-size: large'>" . _("Requesting a certificate with the following properties"); |
|
164 | + echo "<p style='font-size: large'>"._("Requesting a certificate with the following properties"); |
|
165 | 165 | echo "<ul>"; |
166 | - echo "<li>" . _("Policy OIDs: ") . implode(", ", $policies) . "</li>"; |
|
167 | - echo "<li>" . _("Distinguished Name: ") . implode(", ", $DN); |
|
166 | + echo "<li>"._("Policy OIDs: ").implode(", ", $policies)."</li>"; |
|
167 | + echo "<li>"._("Distinguished Name: ").implode(", ", $DN); |
|
168 | 168 | if ($modou > 0) { |
169 | 169 | echo " ("; |
170 | - echo _("Organization field adjusted"). ': '; |
|
170 | + echo _("Organization field adjusted").': '; |
|
171 | 171 | $desc = array(); |
172 | 172 | if ($modou >= 2) { |
173 | 173 | $desc[] = _("truncated to 64 chars"); |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | echo ")"; |
180 | 180 | } |
181 | 181 | echo "</li>"; |
182 | - echo "<li>" . _("subjectAltName:DNS : ") . implode(", ", $serverList) . "</li>"; |
|
183 | - echo "<li>" . _("Requester Contact Details: ") . $firstName . " <" . $firstMail . ">" . "</li>"; |
|
182 | + echo "<li>"._("subjectAltName:DNS : ").implode(", ", $serverList)."</li>"; |
|
183 | + echo "<li>"._("Requester Contact Details: ").$firstName." <".$firstMail.">"."</li>"; |
|
184 | 184 | echo "</ul></p>"; |
185 | 185 | |
186 | 186 | $vettedCsr = $validator->string($_POST['CSR'], true); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $loggerInstance->debug(2, $DN, "CERT DN: ", "\n"); |
197 | 197 | // our certs can be good for max 5 years |
198 | 198 | $fed->requestCertificate($user->identifier, $newCsrWithMeta, $expiryDays); |
199 | - echo "<p>" . _("The certificate was requested.") . "</p>"; |
|
199 | + echo "<p>"._("The certificate was requested.")."</p>"; |
|
200 | 200 | ?> |
201 | 201 | <form action="overview_certificates.php" method="GET"> |
202 | 202 | <button type="submit"><?php echo _("Back to Certificate Overview"); ?></button> |
@@ -214,23 +214,23 @@ discard block |
||
214 | 214 | switch (count($feds)) { |
215 | 215 | case 0: |
216 | 216 | echo "<div>"; |
217 | - echo $uiElements->boxRemark("<strong>" . sprintf(_("None of your %s servers has complete information in the database."),$uiElements->nomenclatureFed)."</strong>" . _("At least the DNS names of TLS servers and a role-based contact mail address are required.")); |
|
217 | + echo $uiElements->boxRemark("<strong>".sprintf(_("None of your %s servers has complete information in the database."), $uiElements->nomenclatureFed)."</strong>"._("At least the DNS names of TLS servers and a role-based contact mail address are required.")); |
|
218 | 218 | echo "</div>"; |
219 | 219 | break; |
220 | 220 | case 1: |
221 | - echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
222 | - echo " <strong>" . $cat->knownFederations[$feds[0]->tld] . "</strong>"; |
|
223 | - echo '<input type="hidden" name="NRO-list" id="NRO-list" value="' . $feds[0]->tld . '"/>'; |
|
221 | + echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
222 | + echo " <strong>".$cat->knownFederations[$feds[0]->tld]."</strong>"; |
|
223 | + echo '<input type="hidden" name="NRO-list" id="NRO-list" value="'.$feds[0]->tld.'"/>'; |
|
224 | 224 | break; |
225 | 225 | default: |
226 | - echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>' . sprintf(_("Certificate for %s") ." ", $uiElements->nomenclatureFed) . '</input>'; |
|
226 | + echo '<input type="radio" name="LEVEL" id="NRO" value="NRO" checked>'.sprintf(_("Certificate for %s")." ", $uiElements->nomenclatureFed).'</input>'; |
|
227 | 227 | ?> |
228 | 228 | <select name="NRO-list" id="NRO-list"> |
229 | 229 | <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option> |
230 | 230 | <?php |
231 | 231 | foreach ($feds as $oneFed) { |
232 | 232 | #echo '<option value="' . strtoupper($oneFed->tld) . '">' . $cat->knownFederations[$oneFed->tld] . "</option>"; |
233 | - echo '<option value="AAA' . strtoupper($oneFed->tld) . '">' . $oneIdP["names"][$langObject->getLang()] . "</option>"; |
|
233 | + echo '<option value="AAA'.strtoupper($oneFed->tld).'">'.$oneIdP["names"][$langObject->getLang()]."</option>"; |
|
234 | 234 | |
235 | 235 | } |
236 | 236 | ?> |
@@ -241,13 +241,13 @@ discard block |
||
241 | 241 | ?> |
242 | 242 | <script> |
243 | 243 | var instservers = []; |
244 | - var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo));?>'; |
|
244 | + var nroservers = '<?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?>'; |
|
245 | 245 | <?php |
246 | 246 | $allIdPs = []; |
247 | 247 | foreach ($allAuthorizedFeds as $oneFed) { |
248 | 248 | foreach ($externalDb->listExternalTlsServersInstitution($oneFed['value']) as $id => $oneIdP) { |
249 | - $allIdPs[$id] = '[' . substr($id, 0, 2) . '] ' . $oneIdP["names"][$langObject->getLang()]; |
|
250 | - echo "instservers['" . $id . "']='" . str_replace(",", ", ", $oneIdP["servers"]) . "';\n"; |
|
249 | + $allIdPs[$id] = '['.substr($id, 0, 2).'] '.$oneIdP["names"][$langObject->getLang()]; |
|
250 | + echo "instservers['".$id."']='".str_replace(",", ", ", $oneIdP["servers"])."';\n"; |
|
251 | 251 | } |
252 | 252 | } |
253 | 253 | ?> |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | <option value="notset"><?php echo _("---PLEASE CHOOSE---"); ?></option> |
276 | 276 | <?php |
277 | 277 | foreach ($allIdPs as $id => $name) { |
278 | - echo '<option value="' . $id . '">' . $name . "</option>"; |
|
278 | + echo '<option value="'.$id.'">'.$name."</option>"; |
|
279 | 279 | } |
280 | 280 | ?> |
281 | 281 | </select> |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | <?php |
285 | 285 | echo _('According to the above settings you will receive') |
286 | 286 | ?> |
287 | - <span id='certlevel'><?php echo _('NRO level certificate');?></span> |
|
287 | + <span id='certlevel'><?php echo _('NRO level certificate'); ?></span> |
|
288 | 288 | |
289 | 289 | </span>for server names: |
290 | 290 | <span id='serversinfo'><?php echo str_replace(",", ", ", array_key_first($serverInfo)); ?></span> |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | <?php |
293 | 293 | } else { |
294 | 294 | echo "<div>"; |
295 | - echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")),$uiElements->nomenclatureFed), "No TLS capable org!", true); |
|
295 | + echo $uiElements->boxRemark(sprintf(_("<strong>No organisation inside your %s has complete information in the database</strong>."." "._("At least the DNS names of TLS servers and a role-based contact mail address are required.")), $uiElements->nomenclatureFed), "No TLS capable org!", true); |
|
296 | 296 | echo "</div>"; |
297 | 297 | } |
298 | 298 | ?> |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | <h2><?php echo _("2. CSR generation"); ?></h2> |
303 | 303 | <p><?php echo _("One way to generate an acceptable certificate request is via this openssl one-liner:"); ?></p> |
304 | 304 | <?php |
305 | - echo "openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /". implode('/', array_reverse($DN)) ."/C=XY/O=WillBeReplaced/CN=will.be.replaced"; |
|
305 | + echo "openssl req -new -newkey rsa:4096 -out test.csr -keyout test.key -subj /".implode('/', array_reverse($DN))."/C=XY/O=WillBeReplaced/CN=will.be.replaced"; |
|
306 | 306 | ?> |
307 | 307 | <h2><?php echo _("3. Submission"); ?></h2> |
308 | 308 | <?php echo _("Please paste your CSR here:"); ?><br/><textarea name="CSR" id="CSR" rows="20" cols="85"/></textarea><br/> |