@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | return $this->counter; |
127 | 127 | } |
128 | 128 | |
129 | - $cachedNumber = @file_get_contents(ROOT . "/var/tmp/cachedSPNumber.serialised"); |
|
129 | + $cachedNumber = @file_get_contents(ROOT."/var/tmp/cachedSPNumber.serialised"); |
|
130 | 130 | if ($cachedNumber !== FALSE) { |
131 | 131 | $numberData = unserialize($cachedNumber); |
132 | 132 | $now = new \DateTime(); |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } else { // data in cache is too old or doesn't exist. We really need to ask the database |
140 | 140 | $list = $this->listAllServiceProviders(); |
141 | 141 | $this->counter = count($list); |
142 | - file_put_contents(ROOT . "/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
142 | + file_put_contents(ROOT."/var/tmp/cachedSPNumber.serialised", serialize(["number" => $this->counter, "timestamp" => new \DateTime()])); |
|
143 | 143 | return $this->counter; |
144 | 144 | } |
145 | 145 | } |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $returnarray = []; |
189 | 189 | $query = "SELECT id_institution AS id, country, inst_realm as realmlist, name AS collapsed_name, contact AS collapsed_contact, type FROM view_active_institution WHERE country = ?"; |
190 | 190 | if ($eduroamDbType !== NULL) { |
191 | - $query .= " AND ( type = '" . ExternalEduroamDBData::TYPE_IDPSP . "' OR type = '" . $eduroamDbType . "')"; |
|
191 | + $query .= " AND ( type = '".ExternalEduroamDBData::TYPE_IDPSP."' OR type = '".$eduroamDbType."')"; |
|
192 | 192 | } |
193 | 193 | $externals = $this->db->exec($query, "s", $tld); |
194 | 194 | // was a SELECT query, so a resource and not a boolean |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $instServerTransaction = $this->db->exec($query, "s", $tld); |
292 | 292 | while ($instServerResponses = mysqli_fetch_object(/** @scrutinizer ignore-type */ $instServerTransaction)) { |
293 | 293 | $contactList = $this->dissectCollapsedContacts($instServerResponses->contacts); |
294 | - $retval[$instServerResponses->ROid . $instServerResponses->instid] = [ |
|
294 | + $retval[$instServerResponses->ROid.$instServerResponses->instid] = [ |
|
295 | 295 | "names" => $this->splitNames($instServerResponses->inst_name), |
296 | 296 | "type" => $instServerResponses->type, |
297 | 297 | "servers" => $instServerResponses->servers, |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $uiElements = new web\lib\admin\UIElements(); |
@@ -50,16 +50,16 @@ discard block |
||
50 | 50 | <div class="infobox"> |
51 | 51 | <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2> |
52 | 52 | <table> |
53 | - <caption><?php echo $tablecaption;?></caption> |
|
53 | + <caption><?php echo $tablecaption; ?></caption> |
|
54 | 54 | <tr> |
55 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
56 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
57 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
55 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
56 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
57 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
58 | 58 | </tr> |
59 | 59 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
60 | 60 | <tr> |
61 | 61 | <td> |
62 | - <?php echo "" . _("Unique Identifier") ?> |
|
62 | + <?php echo ""._("Unique Identifier") ?> |
|
63 | 63 | </td> |
64 | 64 | <td> |
65 | 65 | </td> |
@@ -71,14 +71,14 @@ discard block |
||
71 | 71 | </div> |
72 | 72 | |
73 | 73 | <form action='overview_certificates.php' method='GET' accept-charset='UTF-8'> |
74 | - <button type='submit'><?php echo sprintf(_('RADIUS/TLS Certificate management'));?></button> |
|
74 | + <button type='submit'><?php echo sprintf(_('RADIUS/TLS Certificate management')); ?></button> |
|
75 | 75 | </form> |
76 | 76 | |
77 | 77 | <?php |
78 | 78 | $mgmt = new \core\UserManagement(); |
79 | 79 | |
80 | 80 | if (!$user->isFederationAdmin()) { |
81 | - echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>"; |
|
81 | + echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>"; |
|
82 | 82 | echo $deco->footer(); |
83 | 83 | exit(0); |
84 | 84 | } |
@@ -92,16 +92,16 @@ discard block |
||
92 | 92 | <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?> |
93 | 93 | </h2> |
94 | 94 | <table> |
95 | - <caption><?php echo $tablecaption2;?></caption> |
|
95 | + <caption><?php echo $tablecaption2; ?></caption> |
|
96 | 96 | <tr> |
97 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
98 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
99 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
97 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
98 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
99 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
100 | 100 | </tr> |
101 | 101 | <!-- fed properties --> |
102 | 102 | <tr> |
103 | 103 | <td> |
104 | - <?php echo "" . _("Country") ?> |
|
104 | + <?php echo ""._("Country") ?> |
|
105 | 105 | </td> |
106 | 106 | <td> |
107 | 107 | </td> |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | default: |
183 | 183 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
184 | 184 | } |
185 | - echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); |
|
185 | + echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); |
|
186 | 186 | break; |
187 | 187 | case "FAILURE": |
188 | 188 | echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | default: |
203 | 203 | throw new Exception("Error: unknown encryption status of invitation!?!"); |
204 | 204 | } |
205 | - echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); |
|
205 | + echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); |
|
206 | 206 | break; |
207 | 207 | case "INVALIDSYNTAX": |
208 | 208 | echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); |
@@ -218,27 +218,27 @@ discard block |
||
218 | 218 | } else { |
219 | 219 | $link = 'http://'; |
220 | 220 | } |
221 | - $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; |
|
221 | + $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; |
|
222 | 222 | $link = htmlspecialchars($link); |
223 | 223 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') { |
224 | 224 | echo "<table><tr> |
225 | - <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP) . "</td> |
|
225 | + <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP)."</td> |
|
226 | 226 | <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'> |
227 | 227 | <input type='hidden' name='comefrom' id='comefrom' value='$link'/> |
228 | - <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button> |
|
228 | + <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button> |
|
229 | 229 | </form> |
230 | 230 | </td> |
231 | 231 | </tr> |
232 | 232 | </table>"; |
233 | 233 | } |
234 | 234 | if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') { |
235 | - $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>"; |
|
235 | + $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>"; |
|
236 | 236 | } else { |
237 | 237 | $helptext = ""; |
238 | 238 | } |
239 | 239 | ?> |
240 | 240 | <table class='user_overview' style='border:0px; width:unset'> |
241 | - <caption><?php echo _("Participant Details");?></caption> |
|
241 | + <caption><?php echo _("Participant Details"); ?></caption> |
|
242 | 242 | <tr> |
243 | 243 | <th scope='col' style="width:13em"><?php echo _("Configured / Visible / OpenRoaming"); ?></th> |
244 | 244 | <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureParticipant); ?></th> |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | $pending_invites = $mgmt->listPendingInvitations(); |
248 | 248 | |
249 | 249 | if (\config\Master::DB['enforce-external-sync']) { |
250 | - echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>"; |
|
250 | + echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>"; |
|
251 | 251 | } |
252 | 252 | ?> |
253 | 253 | <th scope='col'> |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | foreach ($feds as $onefed) { |
263 | 263 | $thefed = new \core\Federation(strtoupper($onefed['value'])); |
264 | 264 | /// nomenclature for 'federation', federation name, nomenclature for 'inst' |
265 | - echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>"; |
|
265 | + echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>"; |
|
266 | 266 | |
267 | 267 | // extract only pending invitations for *this* fed |
268 | 268 | $display_pendings = FALSE; |
@@ -287,9 +287,9 @@ discard block |
||
287 | 287 | // deployment status; need to dive into profiles for this |
288 | 288 | // show happy eyeballs if at least one profile is configured/showtime |
289 | 289 | echo "<td>"; |
290 | - echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-" ) |
|
290 | + echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-") |
|
291 | 291 | . " " |
292 | - . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-" ) |
|
292 | + . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-") |
|
293 | 293 | . " " |
294 | 294 | . "<span style='color:"; |
295 | 295 | switch ($idp_instance->maxOpenRoamingStatus()) { |
@@ -324,23 +324,23 @@ discard block |
||
324 | 324 | } |
325 | 325 | } |
326 | 326 | echo "<td style='vertical-align:top;'> |
327 | - <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) . implode("</li><li>", $listOfSilverbulletRealms) . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" ) . " |
|
327 | + <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name.(empty($listOfSilverbulletRealms) ? "" : "<ul><li>").implode("</li><li>", $listOfSilverbulletRealms).(empty($listOfSilverbulletRealms) ? "" : "</li><ul>")." |
|
328 | 328 | </td>"; |
329 | 329 | // external DB sync, if configured as being necessary |
330 | 330 | if (\config\Master::DB['enforce-external-sync']) { |
331 | 331 | echo "<td style='display: ruby;'>"; |
332 | 332 | if ($readonly === FALSE) { |
333 | - echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
334 | - <button type='submit'>" . _("Manage DB Link") . "</button></form> "; |
|
333 | + echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
334 | + <button type='submit'>" . _("Manage DB Link")."</button></form> "; |
|
335 | 335 | } |
336 | 336 | switch ($idp_instance->getExternalDBSyncState()) { |
337 | 337 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING: |
338 | 338 | break; |
339 | 339 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: |
340 | - echo "<div class='acceptable'>" . _("Linked") . "</div>"; |
|
340 | + echo "<div class='acceptable'>"._("Linked")."</div>"; |
|
341 | 341 | break; |
342 | 342 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: |
343 | - echo "<div class='notacceptable'>" . _("NOT linked") . "</div>"; |
|
343 | + echo "<div class='notacceptable'>"._("NOT linked")."</div>"; |
|
344 | 344 | |
345 | 345 | |
346 | 346 | break; |
@@ -353,9 +353,9 @@ discard block |
||
353 | 353 | echo "<td style='vertical-align: top;'>"; |
354 | 354 | if ($readonly === FALSE) { |
355 | 355 | echo "<div style='white-space: nowrap;'> |
356 | - <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
356 | + <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
|
357 | 357 | <button type='submit'>" . |
358 | - _("Add/Remove Administrators") . " |
|
358 | + _("Add/Remove Administrators")." |
|
359 | 359 | </button> |
360 | 360 | </form> |
361 | 361 | </div>"; |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | echo "<tr> |
369 | 369 | <td colspan='2'> |
370 | 370 | <strong>" . |
371 | - sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . " |
|
371 | + sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)." |
|
372 | 372 | </strong> |
373 | 373 | </td> |
374 | 374 | </tr>"; |
@@ -376,16 +376,16 @@ discard block |
||
376 | 376 | if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) { |
377 | 377 | echo "<tr> |
378 | 378 | <td>" . |
379 | - $oneinvite['name'] . " |
|
379 | + $oneinvite['name']." |
|
380 | 380 | </td> |
381 | 381 | <td>" . |
382 | - $oneinvite['mail'] . " |
|
382 | + $oneinvite['mail']." |
|
383 | 383 | </td> |
384 | 384 | <td colspan=2>"; |
385 | 385 | if ($readonly === FALSE) { |
386 | 386 | echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'> |
387 | - <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/> |
|
388 | - <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> " |
|
387 | + <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/> |
|
388 | + <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> " |
|
389 | 389 | . sprintf(_("(expires %s)"), $oneinvite['expiry']) |
390 | 390 | . "</form>"; |
391 | 391 | } |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | #private const EDUPKI_RA_PKEY_PASSPHRASE = "..."; |
25 | 25 | |
26 | 26 | |
27 | - private const LOCATION_RA_CERT = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
28 | - private const LOCATION_RA_KEY = ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey"; |
|
29 | - private const LOCATION_WEBROOT = ROOT . "/config/SilverbulletClientCerts/eduPKI-webserver-root.pem"; |
|
27 | + private const LOCATION_RA_CERT = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
28 | + private const LOCATION_RA_KEY = ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey"; |
|
29 | + private const LOCATION_WEBROOT = ROOT."/config/SilverbulletClientCerts/eduPKI-webserver-root.pem"; |
|
30 | 30 | private const EDUPKI_RA_ID = 700; |
31 | 31 | private const EDUPKI_CERT_PROFILE = "Radius Server SOAP"; |
32 | 32 | private const EDUPKI_RA_PKEY_PASSPHRASE = "..."; |
@@ -42,13 +42,13 @@ discard block |
||
42 | 42 | parent::__construct(); |
43 | 43 | |
44 | 44 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_CERT) === FALSE) { |
45 | - throw new Exception("RA operator PEM file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT); |
|
45 | + throw new Exception("RA operator PEM file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT); |
|
46 | 46 | } |
47 | 47 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_RA_KEY) === FALSE) { |
48 | - throw new Exception("RA operator private key file not found: " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY); |
|
48 | + throw new Exception("RA operator private key file not found: ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY); |
|
49 | 49 | } |
50 | 50 | if (stat(CertificationAuthorityEduPkiServer::LOCATION_WEBROOT) === FALSE) { |
51 | - throw new Exception("CA website root CA file not found: " . CertificationAuthorityEduPkiServer::LOCATION_WEBROOT); |
|
51 | + throw new Exception("CA website root CA file not found: ".CertificationAuthorityEduPkiServer::LOCATION_WEBROOT); |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
@@ -106,22 +106,22 @@ discard block |
||
106 | 106 | // initialise connection to eduPKI CA / eduroam RA and send the request to them |
107 | 107 | try { |
108 | 108 | $altArray = [# Array mit den Subject Alternative Names |
109 | - "email:" . $csr["USERMAIL"] |
|
109 | + "email:".$csr["USERMAIL"] |
|
110 | 110 | ]; |
111 | 111 | foreach ($csr["ALTNAMES"] as $oneAltName) { |
112 | - $altArray[] = "DNS:" . $oneAltName; |
|
112 | + $altArray[] = "DNS:".$oneAltName; |
|
113 | 113 | } |
114 | 114 | $soapPub = $this->initEduPKISoapSession("PUBLIC"); |
115 | 115 | $this->loggerInstance->debug(5, "FIRST ACTUAL SOAP REQUEST (Public, newRequest)!\n"); |
116 | - $this->loggerInstance->debug(5, "PARAM_1: " . CertificationAuthorityEduPkiServer::EDUPKI_RA_ID . "\n"); |
|
117 | - $this->loggerInstance->debug(5, "PARAM_2: " . $csr["CSR_STRING"] . "\n"); |
|
116 | + $this->loggerInstance->debug(5, "PARAM_1: ".CertificationAuthorityEduPkiServer::EDUPKI_RA_ID."\n"); |
|
117 | + $this->loggerInstance->debug(5, "PARAM_2: ".$csr["CSR_STRING"]."\n"); |
|
118 | 118 | $this->loggerInstance->debug(5, "PARAM_3: "); |
119 | 119 | $this->loggerInstance->debug(5, $altArray); |
120 | - $this->loggerInstance->debug(5, "PARAM_4: " . CertificationAuthorityEduPkiServer::EDUPKI_CERT_PROFILE . "\n"); |
|
121 | - $this->loggerInstance->debug(5, "PARAM_5: " . sha1("notused") . "\n"); |
|
122 | - $this->loggerInstance->debug(5, "PARAM_6: " . $csr["USERNAME"] . "\n"); |
|
123 | - $this->loggerInstance->debug(5, "PARAM_7: " . $csr["USERMAIL"] . "\n"); |
|
124 | - $this->loggerInstance->debug(5, "PARAM_8: " . ProfileSilverbullet::PRODUCTNAME . "\n"); |
|
120 | + $this->loggerInstance->debug(5, "PARAM_4: ".CertificationAuthorityEduPkiServer::EDUPKI_CERT_PROFILE."\n"); |
|
121 | + $this->loggerInstance->debug(5, "PARAM_5: ".sha1("notused")."\n"); |
|
122 | + $this->loggerInstance->debug(5, "PARAM_6: ".$csr["USERNAME"]."\n"); |
|
123 | + $this->loggerInstance->debug(5, "PARAM_7: ".$csr["USERMAIL"]."\n"); |
|
124 | + $this->loggerInstance->debug(5, "PARAM_8: ".ProfileSilverbullet::PRODUCTNAME."\n"); |
|
125 | 125 | $this->loggerInstance->debug(5, "PARAM_9: false\n"); |
126 | 126 | $soapNewRequest = $soapPub->newRequest( |
127 | 127 | CertificationAuthorityEduPkiServer::EDUPKI_RA_ID, # RA-ID |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | } catch (Exception $e) { |
144 | 144 | // PHP 7.1 can do this much better |
145 | 145 | if (is_soap_fault($e)) { |
146 | - throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: { |
|
146 | + throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: { |
|
147 | 147 | $e->faultstring |
148 | 148 | }\n"); |
149 | 149 | } |
150 | - throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage()); |
|
150 | + throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage()); |
|
151 | 151 | } |
152 | 152 | try { |
153 | 153 | $soap = $this->initEduPKISoapSession("RA"); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file |
182 | 182 | // rather than just using the string. Grr. |
183 | 183 | $tempdir = \core\common\Entity::createTemporaryDirectory("test"); |
184 | - file_put_contents($tempdir['dir'] . "/content.txt", $soapCleartext); |
|
184 | + file_put_contents($tempdir['dir']."/content.txt", $soapCleartext); |
|
185 | 185 | // retrieve our RA cert from filesystem |
186 | 186 | // the RA certificates are not needed right now because we |
187 | 187 | // have resorted to S/MIME signatures with openssl command-line |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | // sign the data, using cmdline because openssl_pkcs7_sign produces strange results |
194 | 194 | // -binary didn't help, nor switch -md to sha1 sha256 or sha512 |
195 | 195 | $this->loggerInstance->debug(5, "Actual content to be signed is this:\n $soapCleartext\n"); |
196 | - $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer " . ROOT . "/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
196 | + $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.clearkey -signer ".ROOT."/config/SilverbulletClientCerts/edupki-test-ra.pem"; |
|
197 | 197 | $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n"); |
198 | 198 | $output = []; |
199 | 199 | $return = 999; |
@@ -202,21 +202,21 @@ discard block |
||
202 | 202 | throw new Exception("Non-zero return value from openssl smime!"); |
203 | 203 | } |
204 | 204 | // and get the signature blob back from the filesystem |
205 | - $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt")); |
|
205 | + $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt")); |
|
206 | 206 | $this->loggerInstance->debug(5, "Request for server approveRequest has parameters:\n"); |
207 | - $this->loggerInstance->debug(5, $soapReqnum . "\n"); |
|
208 | - $this->loggerInstance->debug(5, $soapCleartext . "\n"); // PHP magically encodes this as base64 while sending! |
|
209 | - $this->loggerInstance->debug(5, $detachedSig . "\n"); |
|
207 | + $this->loggerInstance->debug(5, $soapReqnum."\n"); |
|
208 | + $this->loggerInstance->debug(5, $soapCleartext."\n"); // PHP magically encodes this as base64 while sending! |
|
209 | + $this->loggerInstance->debug(5, $detachedSig."\n"); |
|
210 | 210 | $soapIssueCert = $soap->approveRequest($soapReqnum, $soapCleartext, $detachedSig); |
211 | - $this->loggerInstance->debug(5, "approveRequest Request was: \n" . $soap->__getLastRequest()); |
|
212 | - $this->loggerInstance->debug(5, "approveRequest Response was: \n" . $soap->__getLastResponse()); |
|
211 | + $this->loggerInstance->debug(5, "approveRequest Request was: \n".$soap->__getLastRequest()); |
|
212 | + $this->loggerInstance->debug(5, "approveRequest Response was: \n".$soap->__getLastResponse()); |
|
213 | 213 | if ($soapIssueCert === FALSE) { |
214 | 214 | throw new Exception("The locally approved request was NOT processed by the CA."); |
215 | 215 | } |
216 | 216 | } catch (SoapFault $e) { |
217 | - throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
217 | + throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
218 | 218 | } catch (Exception $e) { |
219 | - throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage()); |
|
219 | + throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage()); |
|
220 | 220 | } |
221 | 221 | return $soapReqnum; |
222 | 222 | } |
@@ -268,9 +268,9 @@ discard block |
||
268 | 268 | throw new Exception("CAInfo has no root certificate for us!"); |
269 | 269 | } |
270 | 270 | } catch (SoapFault $e) { |
271 | - throw new Exception("SoapFault: Error when sending or receiving SOAP message: " . "{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
271 | + throw new Exception("SoapFault: Error when sending or receiving SOAP message: "."{$e->faultcode}: {$e->faultname}: {$e->faultstring}: {$e->faultactor}: {$e->detail}: {$e->headerfault}\n"); |
|
272 | 272 | } catch (Exception $e) { |
273 | - throw new Exception("Exception: Something odd happened between the SOAP requests:" . $e->getMessage()); |
|
273 | + throw new Exception("Exception: Something odd happened between the SOAP requests:".$e->getMessage()); |
|
274 | 274 | } |
275 | 275 | return [ |
276 | 276 | "CERT" => openssl_x509_read($parsedCert['pem']), |
@@ -303,12 +303,12 @@ discard block |
||
303 | 303 | // for obnoxious reasons, we have to dump the request into a file and let pkcs7_sign read from the file |
304 | 304 | // rather than just using the string. Grr. |
305 | 305 | $tempdir = \core\common\Entity::createTemporaryDirectory("test"); |
306 | - file_put_contents($tempdir['dir'] . "/content.txt", $soapRawRevRequest); |
|
306 | + file_put_contents($tempdir['dir']."/content.txt", $soapRawRevRequest); |
|
307 | 307 | // retrieve our RA cert from filesystem |
308 | 308 | // sign the data, using cmdline because openssl_pkcs7_sign produces strange results |
309 | 309 | // -binary didn't help, nor switch -md to sha1 sha256 or sha512 |
310 | 310 | $this->loggerInstance->debug(5, "Actual content to be signed is this:\n$soapRawRevRequest\n"); |
311 | - $execCmd = \config\Master::PATHS['openssl'] . " smime -sign -binary -in " . $tempdir['dir'] . "/content.txt -out " . $tempdir['dir'] . "/signature.txt -outform pem -inkey " . CertificationAuthorityEduPkiServer::LOCATION_RA_KEY . " -signer " . CertificationAuthorityEduPkiServer::LOCATION_RA_CERT; |
|
311 | + $execCmd = \config\Master::PATHS['openssl']." smime -sign -binary -in ".$tempdir['dir']."/content.txt -out ".$tempdir['dir']."/signature.txt -outform pem -inkey ".CertificationAuthorityEduPkiServer::LOCATION_RA_KEY." -signer ".CertificationAuthorityEduPkiServer::LOCATION_RA_CERT; |
|
312 | 312 | $this->loggerInstance->debug(2, "Calling openssl smime with following cmdline: $execCmd\n"); |
313 | 313 | $output = []; |
314 | 314 | $return = 999; |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | throw new Exception("Non-zero return value from openssl smime!"); |
318 | 318 | } |
319 | 319 | // and get the signature blob back from the filesystem |
320 | - $detachedSig = trim(file_get_contents($tempdir['dir'] . "/signature.txt")); |
|
320 | + $detachedSig = trim(file_get_contents($tempdir['dir']."/signature.txt")); |
|
321 | 321 | $soapIssueRev = $soap->approveRevocationRequest($soapRevocationSerial, $soapRawRevRequest, $detachedSig); |
322 | 322 | if ($soapIssueRev === FALSE) { |
323 | 323 | throw new Exception("The locally approved revocation request was NOT processed by the CA."); |
@@ -325,9 +325,9 @@ discard block |
||
325 | 325 | } catch (Exception $e) { |
326 | 326 | // PHP 7.1 can do this much better |
327 | 327 | if (is_soap_fault($e)) { |
328 | - throw new Exception("Error when sending SOAP request: " . "{$e->faultcode}: {$e->faultstring}\n"); |
|
328 | + throw new Exception("Error when sending SOAP request: "."{$e->faultcode}: {$e->faultstring}\n"); |
|
329 | 329 | } |
330 | - throw new Exception("Something odd happened while doing the SOAP request:" . $e->getMessage()); |
|
330 | + throw new Exception("Something odd happened while doing the SOAP request:".$e->getMessage()); |
|
331 | 331 | } |
332 | 332 | } |
333 | 333 | |
@@ -427,9 +427,9 @@ discard block |
||
427 | 427 | */ |
428 | 428 | public function soapToXmlInteger($x) |
429 | 429 | { |
430 | - return '<' . $x[0] . '>' |
|
430 | + return '<'.$x[0].'>' |
|
431 | 431 | . htmlentities($x[1], ENT_NOQUOTES | ENT_XML1) |
432 | - . '</' . $x[0] . '>'; |
|
432 | + . '</'.$x[0].'>'; |
|
433 | 433 | } |
434 | 434 | |
435 | 435 | /** |
@@ -448,9 +448,9 @@ discard block |
||
448 | 448 | // dump private key into directory |
449 | 449 | $outstring = ""; |
450 | 450 | openssl_pkey_export($privateKey, $outstring); |
451 | - file_put_contents($tempdir . "/pkey.pem", $outstring); |
|
451 | + file_put_contents($tempdir."/pkey.pem", $outstring); |
|
452 | 452 | // PHP can only do one DC in the Subject. But we need three. |
453 | - $execCmd = \config\Master::PATHS['openssl'] . " req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=" . \config\ConfAssistant::CONSORTIUM['name'] . "/OU=$fed/CN=$username/emailAddress=$username"; |
|
453 | + $execCmd = \config\Master::PATHS['openssl']." req -new -sha256 -key $tempdir/pkey.pem -out $tempdir/request.csr -subj /DC=test/DC=test/DC=eduroam/C=$fed/O=".\config\ConfAssistant::CONSORTIUM['name']."/OU=$fed/CN=$username/emailAddress=$username"; |
|
454 | 454 | $this->loggerInstance->debug(2, "Calling openssl req with following cmdline: $execCmd\n"); |
455 | 455 | $output = []; |
456 | 456 | $return = 999; |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | $retval = "<div class='sidebar'><p>"; |
67 | 67 | |
68 | 68 | if ($advancedControls) { |
69 | - $retval .= "<strong>" . _("You are:") . "</strong> ".$_SESSION['name'] |
|
69 | + $retval .= "<strong>"._("You are:")."</strong> ".$_SESSION['name'] |
|
70 | 70 | ."<br/> |
71 | 71 | <br/> |
72 | - <a href='" . \core\CAT::getRootUrlPath() . "/admin/overview_user.php'>" . _("Go to your Profile page") . "</a> |
|
73 | - <a href='" . \core\CAT::getRootUrlPath() . "/admin/inc/logout.php'>" . _("Logout") . "</a> "; |
|
72 | + <a href='" . \core\CAT::getRootUrlPath()."/admin/overview_user.php'>"._("Go to your Profile page")."</a> |
|
73 | + <a href='" . \core\CAT::getRootUrlPath()."/admin/inc/logout.php'>"._("Logout")."</a> "; |
|
74 | 74 | } |
75 | - $retval .= "<a href='" . \core\CAT::getRootUrlPath() . "/'>" . _("Start page") . "</a> |
|
75 | + $retval .= "<a href='".\core\CAT::getRootUrlPath()."/'>"._("Start page")."</a> |
|
76 | 76 | </p> |
77 | 77 | </div> <!-- sidebar -->"; |
78 | 78 | \core\common\Entity::outOfThePotatoes(); |
@@ -96,23 +96,23 @@ discard block |
||
96 | 96 | <h1>$cap1</h1> |
97 | 97 | </div><!--header_captions--> |
98 | 98 | <div id='langselection' style='padding-top:20px; padding-left:10px;'> |
99 | - <form action='$place' method='GET' accept-charset='UTF-8'>" . _("View this page in") . " |
|
99 | + <form action='$place' method='GET' accept-charset='UTF-8'>"._("View this page in")." |
|
100 | 100 | <select id='lang' name='lang' onchange='this.form.submit()'>"; |
101 | 101 | |
102 | 102 | foreach (\config\Master::LANGUAGES as $lang => $getValue) { |
103 | - $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $getValue['display'] . "</option> "; |
|
103 | + $retval .= "<option value='$lang' ".(strtoupper($language) == strtoupper($lang) ? "selected" : "")." >".$getValue['display']."</option> "; |
|
104 | 104 | } |
105 | 105 | $retval .= "</select>"; |
106 | 106 | |
107 | 107 | foreach ($_GET as $getVar => $getValue) { |
108 | 108 | $filterValue = filter_input(INPUT_GET, $getVar, FILTER_SANITIZE_STRING); |
109 | 109 | if ($getVar != "lang" && $getValue != "") { |
110 | - $retval .= "<input type='hidden' name='" . htmlspecialchars($getVar) . "' value='" . htmlspecialchars($filterValue) . "'>"; |
|
110 | + $retval .= "<input type='hidden' name='".htmlspecialchars($getVar)."' value='".htmlspecialchars($filterValue)."'>"; |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | $retval .= "</form> |
114 | 114 | </div><!--langselection-->"; |
115 | - $logoUrl = \core\CAT::getRootUrlPath() . "/resources/images/consortium_logo.png"; |
|
115 | + $logoUrl = \core\CAT::getRootUrlPath()."/resources/images/consortium_logo.png"; |
|
116 | 116 | $retval .= "<div class='consortium_logo'> |
117 | 117 | <img id='test_locate' src='$logoUrl' alt='Consortium Logo'> |
118 | 118 | </div> <!-- consortium_logo --> |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | if (isset(\config\Master::APPEARANCE['MOTD']) && \config\Master::APPEARANCE['MOTD'] != "") { |
207 | 207 | $retval .= "<div id='header_MOTD' style='display:inline-block; padding-left:20px;vertical-align:top;'> |
208 | - <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD'] . "</p> |
|
208 | + <p class='MOTD'>" . \config\Master::APPEARANCE['MOTD']."</p> |
|
209 | 209 | </div><!--header_MOTD-->"; |
210 | 210 | } |
211 | 211 | $retval .= $this->sidebar($advancedControls); |
@@ -231,9 +231,9 @@ discard block |
||
231 | 231 | <html xmlns='http://www.w3.org/1999/xhtml' lang='$ourlocale'".($this->langObject->rtl ? "dir='rtl'" : "")."> |
232 | 232 | <head lang='$ourlocale'> |
233 | 233 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"; |
234 | - $cssUrl = \core\CAT::getRootUrlPath() . "/resources/css/cat.css.php"; |
|
234 | + $cssUrl = \core\CAT::getRootUrlPath()."/resources/css/cat.css.php"; |
|
235 | 235 | $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />"; |
236 | - $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>"; |
|
236 | + $retval .= "<title>".htmlspecialchars($pagetitle)."</title>"; |
|
237 | 237 | return $retval; |
238 | 238 | } |
239 | 239 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | // we may need to jump up one dir if we are either in admin/ or accountstatus/ |
248 | 248 | // (accountstatus courtesy of my good mood. It's userspace not admin space so |
249 | 249 | // it shouldn't be using this function any more.) |
250 | - $logoBase = \core\CAT::getRootUrlPath() . "/resources/images"; |
|
250 | + $logoBase = \core\CAT::getRootUrlPath()."/resources/images"; |
|
251 | 251 | return "<span id='logos' style='position:fixed; left:50%;'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/> |
252 | 252 | <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span> |
253 | 253 | <span id='eu_text' style='text-align:right;'><a href='http://ec.europa.eu/dgs/connect/index_en.htm' style='text-decoration:none; vertical-align:top;'>European Commission Communications Networks, Content and Technology</a></span>"; |
@@ -269,9 +269,9 @@ discard block |
||
269 | 269 | <table style='width:100%'> |
270 | 270 | <tr> |
271 | 271 | <td style='padding-left:20px; padding-right:20px; text-align:left; vertical-align:top;'> |
272 | - " . $cat->catCopyright . "</td>"; |
|
272 | + " . $cat->catCopyright."</td>"; |
|
273 | 273 | if (!empty(\config\Master::APPEARANCE['privacy_notice_url'])) { |
274 | - $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>" . sprintf(_("%s Privacy Notice"),\config\ConfAssistant::CONSORTIUM['display_name']) . "</a></td>"; |
|
274 | + $retval .= "<td><a href='".\config\Master::APPEARANCE['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), \config\ConfAssistant::CONSORTIUM['display_name'])."</a></td>"; |
|
275 | 275 | } |
276 | 276 | $retval .= " <td style='padding-left:80px; padding-right:20px; text-align:right; vertical-align:top;'>"; |
277 | 277 |
@@ -61,10 +61,10 @@ |
||
61 | 61 | header("Content-Type:text/html;charset=utf-8"); |
62 | 62 | ?> |
63 | 63 | <!DOCTYPE html> |
64 | - <html xmlns='http://www.w3.org/1999/xhtml' lang='<?php echo $ourlocale;?>' <?php echo ($direction ? "dir='rtl'" : "");?>> |
|
65 | - <head lang='<?php echo $ourlocale;?>'> |
|
64 | + <html xmlns='http://www.w3.org/1999/xhtml' lang='<?php echo $ourlocale; ?>' <?php echo ($direction ? "dir='rtl'" : ""); ?>> |
|
65 | + <head lang='<?php echo $ourlocale; ?>'> |
|
66 | 66 | <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> |
67 | - <title><?php echo htmlspecialchars($pagetitle);?></title> |
|
67 | + <title><?php echo htmlspecialchars($pagetitle); ?></title> |
|
68 | 68 | <script type="text/javascript">ie_version = 0;</script> |
69 | 69 | <!--[if IE]> |
70 | 70 | <script type="text/javascript">ie_version=1;</script> |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | $loggerInstance = new \core\common\Logging(); |
82 | 82 | $olddomain = textdomain(NULL); |
83 | 83 | $loggerInstance->debug(4, "set_locale($domain)\n"); |
84 | - $loggerInstance->debug(4, ROOT . "\n"); |
|
84 | + $loggerInstance->debug(4, ROOT."\n"); |
|
85 | 85 | textdomain($domain); |
86 | - bindtextdomain($domain, ROOT . "/translation/"); |
|
86 | + bindtextdomain($domain, ROOT."/translation/"); |
|
87 | 87 | bind_textdomain_codeset($domain, "UTF-8"); |
88 | 88 | return $olddomain; |
89 | 89 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | // check if this language is supported by the CAT config |
138 | 138 | foreach (\config\Master::LANGUAGES as $language => $value) { |
139 | - if (preg_match("/^" . $language . ".*/", $tryLang)) { |
|
139 | + if (preg_match("/^".$language.".*/", $tryLang)) { |
|
140 | 140 | $localeTmp = $value['locale']; |
141 | 141 | $langIndex = $language; // ??? |
142 | 142 | break; |
@@ -151,12 +151,12 @@ discard block |
||
151 | 151 | } |
152 | 152 | } |
153 | 153 | } |
154 | - putenv("LC_ALL=" . $theLocale); |
|
154 | + putenv("LC_ALL=".$theLocale); |
|
155 | 155 | $_SESSION['language'] = $langIndex; |
156 | 156 | $loggerInstance = new \core\common\Logging(); |
157 | 157 | $loggerInstance->debug(4, "selected lang:$langIndex:$theLocale\n"); |
158 | 158 | $loggerInstance->debug(4, print_r($langConverted, true)); |
159 | - return([$langIndex, $theLocale,$isRtl]); |
|
159 | + return([$langIndex, $theLocale, $isRtl]); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |