@@ -156,8 +156,8 @@ |
||
156 | 156 | // replace namespace separators with directory separators |
157 | 157 | // in the relative class name, append with .php |
158 | 158 | $file = $base_dir |
159 | - . str_replace('\\', '/', $relative_class) |
|
160 | - . '.php'; |
|
159 | + . str_replace('\\', '/', $relative_class) |
|
160 | + . '.php'; |
|
161 | 161 | |
162 | 162 | // if the mapped file exists, require it |
163 | 163 | if ($this->requireFile($file)) { |
@@ -97,10 +97,10 @@ |
||
97 | 97 | public function addNamespace($prefix, $base_dir, $prepend = false) |
98 | 98 | { |
99 | 99 | // normalize namespace prefix |
100 | - $prefix = trim($prefix, '\\') . '\\'; |
|
100 | + $prefix = trim($prefix, '\\').'\\'; |
|
101 | 101 | |
102 | 102 | // normalize the base directory with a trailing separator |
103 | - $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR) . '/'; |
|
103 | + $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR).'/'; |
|
104 | 104 | |
105 | 105 | // initialize the namespace prefix array |
106 | 106 | if (isset($this->prefixes[$prefix]) === false) { |
@@ -9,7 +9,7 @@ |
||
9 | 9 | */ |
10 | 10 | ?> |
11 | 11 | <h1>Example Skin (main user frontpage)</h1> |
12 | -<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/> |
|
12 | +<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/> |
|
13 | 13 | <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p> |
14 | 14 | <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename): |
15 | -<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/> |
|
15 | +<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/> |
@@ -246,11 +246,11 @@ discard block |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
249 | - * This function parses a X.509 cert and returns all certificatePolicies OIDs |
|
250 | - * |
|
251 | - * @param array $cert (returned from openssl_x509_parse) |
|
252 | - * @return array of OIDs |
|
253 | - */ |
|
249 | + * This function parses a X.509 cert and returns all certificatePolicies OIDs |
|
250 | + * |
|
251 | + * @param array $cert (returned from openssl_x509_parse) |
|
252 | + * @return array of OIDs |
|
253 | + */ |
|
254 | 254 | private function propertyCheckPolicy($cert) { |
255 | 255 | $oids = []; |
256 | 256 | if ($cert['extensions']['certificatePolicies']) { |
@@ -263,11 +263,11 @@ discard block |
||
263 | 263 | return $oids; |
264 | 264 | } |
265 | 265 | /** |
266 | - * This function parses a X.509 cert and returns the value of $field |
|
267 | - * |
|
268 | - * @param array $cert (returned from openssl_x509_parse) |
|
269 | - * @return string value of the issuer field or '' |
|
270 | - */ |
|
266 | + * This function parses a X.509 cert and returns the value of $field |
|
267 | + * |
|
268 | + * @param array $cert (returned from openssl_x509_parse) |
|
269 | + * @return string value of the issuer field or '' |
|
270 | + */ |
|
271 | 271 | private function getCertificateIssuer($cert) { |
272 | 272 | $issuer = ''; |
273 | 273 | foreach ($cert['issuer'] as $key => $val) { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['status'] = $cert['status']; |
143 | 143 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['message'] = $this->TLS_certkeys[$cert['status']]; |
144 | 144 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['expected'] = $cert['expected']; |
145 | - $add = ' -cert ' . ROOT . '/config/cli-certs/' . $cert['public'] . ' -key ' . ROOT . '/config/cli-certs/' . $cert['private']; |
|
145 | + $add = ' -cert '.ROOT.'/config/cli-certs/'.$cert['public'].' -key '.ROOT.'/config/cli-certs/'.$cert['private']; |
|
146 | 146 | if (!isset($this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k])) { |
147 | 147 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k] = []; |
148 | 148 | } |
@@ -186,11 +186,11 @@ discard block |
||
186 | 186 | // but code analysers want this more explicit, so here is this extra |
187 | 187 | // call to escapeshellarg() |
188 | 188 | $escapedHost = escapeshellarg($host); |
189 | - $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -tls1 -CApath " . ROOT . "/config/ca-certs/ $arg 2>&1\n"); |
|
189 | + $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -tls1 -CApath ".ROOT."/config/ca-certs/ $arg 2>&1\n"); |
|
190 | 190 | $time_start = microtime(true); |
191 | 191 | $opensslbabble = []; |
192 | 192 | $result = 999; // likely to become zero by openssl; don't want to initialise to zero, could cover up exec failures |
193 | - exec(\config\Master::PATHS['openssl'] . " s_client -connect " . $escapedHost . " -tls1 -CApath " . ROOT . "/config/ca-certs/ $arg 2>&1", $opensslbabble, $result); |
|
193 | + exec(\config\Master::PATHS['openssl']." s_client -connect ".$escapedHost." -tls1 -CApath ".ROOT."/config/ca-certs/ $arg 2>&1", $opensslbabble, $result); |
|
194 | 194 | $time_stop = microtime(true); |
195 | 195 | $testresults['time_millisec'] = floor(($time_stop - $time_start) * 1000); |
196 | 196 | $testresults['returncode'] = $result; |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | |
113 | 113 | $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes); |
114 | 114 | |
115 | - $this->loggerInstance->debug(5, "Device-Level Attributes: " . print_r($this->deviceLevelAttributes, true)); |
|
116 | - $this->loggerInstance->debug(5, "EAP-Level Attributes: " . print_r($this->eapLevelAttributes, true)); |
|
117 | - $this->loggerInstance->debug(5, "All low-Level Attributes: " . print_r($attributesLowLevel, true)); |
|
115 | + $this->loggerInstance->debug(5, "Device-Level Attributes: ".print_r($this->deviceLevelAttributes, true)); |
|
116 | + $this->loggerInstance->debug(5, "EAP-Level Attributes: ".print_r($this->eapLevelAttributes, true)); |
|
117 | + $this->loggerInstance->debug(5, "All low-Level Attributes: ".print_r($attributesLowLevel, true)); |
|
118 | 118 | |
119 | 119 | // now fetch and merge profile-level attributes if not already set on deeper level |
120 | 120 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | } |
135 | 135 | |
136 | - $this->loggerInstance->debug(5, "Merged Attributes: " . print_r($attributesLowLevel, true)); |
|
136 | + $this->loggerInstance->debug(5, "Merged Attributes: ".print_r($attributesLowLevel, true)); |
|
137 | 137 | |
138 | 138 | // now, fetch and merge IdP-wide attributes |
139 | 139 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | "row" => $attributeQuery->row, |
189 | 189 | "flag" => $optinfo['flag'], |
190 | 190 | "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL), |
191 | - "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )]; |
|
191 | + "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())]; |
|
192 | 192 | } |
193 | 193 | return $temparray; |
194 | 194 | } |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | * @return void |
290 | 290 | */ |
291 | 291 | public function setAnonymousIDSupport($shallwe) { |
292 | - $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
292 | + $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | /** Toggle special username for realm checks |
@@ -299,8 +299,8 @@ discard block |
||
299 | 299 | * @return void |
300 | 300 | */ |
301 | 301 | public function setRealmCheckUser($shallwe, $localpart = NULL) { |
302 | - $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") . |
|
303 | - ( $localpart !== NULL ? ", checkuser_value = '$localpart' " : "") . |
|
302 | + $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0"). |
|
303 | + ($localpart !== NULL ? ", checkuser_value = '$localpart' " : ""). |
|
304 | 304 | " WHERE profile_id = $this->identifier"); |
305 | 305 | } |
306 | 306 | |
@@ -312,8 +312,8 @@ discard block |
||
312 | 312 | * @return void |
313 | 313 | */ |
314 | 314 | public function setInputVerificationPreference($verify, $hint) { |
315 | - $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") . |
|
316 | - ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") . |
|
315 | + $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0"). |
|
316 | + ", hint_userinput_suffix = ".($hint === true ? "1" : "0"). |
|
317 | 317 | " WHERE profile_id = $this->identifier"); |
318 | 318 | } |
319 | 319 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | */ |
84 | 84 | public function der2pem($derData) { |
85 | 85 | $pem = chunk_split(base64_encode($derData), 64, "\n"); |
86 | - $pem = "-----BEGIN CERTIFICATE-----\n" . $pem . "-----END CERTIFICATE-----\n"; |
|
86 | + $pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n"; |
|
87 | 87 | return $pem; |
88 | 88 | } |
89 | 89 |
@@ -165,8 +165,8 @@ |
||
165 | 165 | $key = array_search($eapType, EAP::EAPTYPES_CONVERSION); |
166 | 166 | if ($key !== FALSE) { |
167 | 167 | // add a type cast to int to make Scrutinizer realise that the key found is always an integer |
168 | - $this->intRep = (int)$key; // array index is always an integer |
|
169 | - $this->arrayRep = EAP::EAPTYPES_CONVERSION[(int)$key]; |
|
168 | + $this->intRep = (int) $key; // array index is always an integer |
|
169 | + $this->arrayRep = EAP::EAPTYPES_CONVERSION[(int) $key]; |
|
170 | 170 | return; |
171 | 171 | } |
172 | 172 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | foreach ($idps as $idp) { |
38 | 38 | $idpTitle[$idp['entityID']] = $idp['title']; |
39 | 39 | $d = self::getIdpDistance($idp, $here); |
40 | - $resultSet[$idp['entityID']] = $d . " " . $idp['title']; |
|
40 | + $resultSet[$idp['entityID']] = $d." ".$idp['title']; |
|
41 | 41 | } |
42 | 42 | asort($resultSet); |
43 | 43 | $outarray = []; |
@@ -24,6 +24,6 @@ |
||
24 | 24 | /** |
25 | 25 | * This script deletes obsolete directories from installer cache and siverbullet directory |
26 | 26 | */ |
27 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
27 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
28 | 28 | |
29 | 29 | web\lib\admin\Maintenance::deleteObsoleteTempDirs(); |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | * It works on two CAs, the RSA and ECDSA variant. There is a separate temp |
29 | 29 | * subdir for both ( temp_ocsp_RSA and temp_ocsp_ECDSA ). |
30 | 30 | */ |
31 | -require_once dirname(dirname(__FILE__)) . "/config/_config.php"; |
|
32 | -if (file_exists(__DIR__ . "/semaphore")) { |
|
31 | +require_once dirname(dirname(__FILE__))."/config/_config.php"; |
|
32 | +if (file_exists(__DIR__."/semaphore")) { |
|
33 | 33 | exit(1); // another instance is still busy doing stuff. Don't interfere. |
34 | 34 | } |
35 | -file_put_contents(__DIR__ . "/semaphore", "BUSY"); |
|
35 | +file_put_contents(__DIR__."/semaphore", "BUSY"); |
|
36 | 36 | $dbLink = \core\DBConnection::handle("INST"); |
37 | 37 | $allSerials = $dbLink->exec("SELECT serial_number, ca_type FROM silverbullet_certificate WHERE serial_number IS NOT NULL AND expiry > NOW() AND OCSP_timestamp < DATE_SUB(NOW(), INTERVAL 1 WEEK)"); |
38 | 38 | // SELECT query -> always returns a mysql_result, not boolean |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | # echo "Writing OCSP statement for serial number $statementRow->serial_number\n"; |
59 | 59 | $filename = strtoupper(dechex($statementRow->serial_number)).".der"; |
60 | 60 | if (strlen($filename) % 2 == 1) { |
61 | - $filename = "0" . $filename; |
|
61 | + $filename = "0".$filename; |
|
62 | 62 | } |
63 | 63 | file_put_contents($tempdirBase."_".$statementRow->ca_type."/".$filename, $statementRow->OCSP); |
64 | 64 | } |
65 | -unlink(__DIR__ . "/semaphore"); |
|
66 | 65 | \ No newline at end of file |
66 | +unlink(__DIR__."/semaphore"); |
|
67 | 67 | \ No newline at end of file |
@@ -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. |