@@ -201,7 +201,7 @@ |
||
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | if (!empty($this->attributes['internal:realm'][0])) { |
| 204 | - $config['USER_REALM'] = $this->attributes['internal:realm'][0]; |
|
| 204 | + $config['USER_REALM'] = $this->attributes['internal:realm'][0]; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
@@ -45,10 +45,10 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | */ |
| 47 | 47 | public function writeInstaller() { |
| 48 | - $installerPath = $this->installerBasename . ".sh"; |
|
| 48 | + $installerPath = $this->installerBasename.".sh"; |
|
| 49 | 49 | $this->copyFile("eduroam_linux_main.sh", $installerPath); |
| 50 | 50 | |
| 51 | - if ( !file_exists($installerPath) ) { |
|
| 51 | + if (!file_exists($installerPath)) { |
|
| 52 | 52 | throw new Exception('File not found.'); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -61,11 +61,11 @@ discard block |
||
| 61 | 61 | fseek($installer, 0, SEEK_END); |
| 62 | 62 | $this->writeMessages($installer); |
| 63 | 63 | $this->writeConfigVars($installer); |
| 64 | - fwrite($installer, 'printf -v INIT_INFO "$INIT_INFO_TMP" "$ORGANISATION" "$EMAIL" "$URL"' . "\n"); |
|
| 65 | - fwrite($installer, 'printf -v INIT_CONFIRMATION "$INIT_CONFIRMATION_TMP" "$ORGANISATION"' . "\n\n"); |
|
| 66 | - fwrite($installer, 'main "$@"; exit' . "\n"); |
|
| 64 | + fwrite($installer, 'printf -v INIT_INFO "$INIT_INFO_TMP" "$ORGANISATION" "$EMAIL" "$URL"'."\n"); |
|
| 65 | + fwrite($installer, 'printf -v INIT_CONFIRMATION "$INIT_CONFIRMATION_TMP" "$ORGANISATION"'."\n\n"); |
|
| 66 | + fwrite($installer, 'main "$@"; exit'."\n"); |
|
| 67 | 67 | } catch (Exception $e) { |
| 68 | - echo 'Error message: ' .$e->getMessage(); |
|
| 68 | + echo 'Error message: '.$e->getMessage(); |
|
| 69 | 69 | } finally { |
| 70 | 70 | fclose($installer); |
| 71 | 71 | return($installerPath); |
@@ -87,9 +87,9 @@ discard block |
||
| 87 | 87 | $out .= "<p>"; |
| 88 | 88 | if ($ssidCount > 1) { |
| 89 | 89 | if ($ssidCount > 2) { |
| 90 | - $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to the following networks:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid'])) . " "; |
|
| 90 | + $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to the following networks:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid']))." "; |
|
| 91 | 91 | } else { |
| 92 | - $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid'])) . " "; |
|
| 92 | + $out .= sprintf(_("In addition to <strong>%s</strong> the installer will also configure access to:"), implode(', ', \config\ConfAssistant::CONSORTIUM['ssid']))." "; |
|
| 93 | 93 | } |
| 94 | 94 | $iterator = 0; |
| 95 | 95 | foreach ($this->attributes['internal:SSID'] as $ssid => $v) { |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @return void |
| 127 | 127 | */ |
| 128 | 128 | private function writeConfigLine($file, $name, $text) { |
| 129 | - $out = $name . '="' . $text . '"' . "\n"; |
|
| 129 | + $out = $name.'="'.$text.'"'."\n"; |
|
| 130 | 130 | // fwrite($file, wordwrap($out, 70, "\n")); |
| 131 | 131 | fwrite($file, $out); |
| 132 | 132 | |
@@ -209,18 +209,18 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | if ($outerId !== NULL) { |
| 212 | - $configRaw['ANONYMOUS_IDENTITY'] = '"' . $outerId . '"'; |
|
| 212 | + $configRaw['ANONYMOUS_IDENTITY'] = '"'.$outerId.'"'; |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | if (!empty($this->attributes['internal:realm'][0])) { |
| 216 | 216 | $config['USER_REALM'] = $this->attributes['internal:realm'][0]; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
| 219 | + if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
| 220 | 220 | $configRaw['HINT_USER_INPUT'] = true; |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | - if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
| 223 | + if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
| 224 | 224 | $configRaw['VERIFY_USER_REALM_INPUT'] = true; |
| 225 | 225 | } else { |
| 226 | 226 | $configRaw['VERIFY_USER_REALM_INPUT'] = false; |
@@ -231,19 +231,19 @@ discard block |
||
| 231 | 231 | } |
| 232 | 232 | |
| 233 | 233 | foreach ($configRaw as $name => $value) { |
| 234 | - fwrite($file, $name ."=". $value . "\n"); |
|
| 234 | + fwrite($file, $name."=".$value."\n"); |
|
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | if ($tou === '') { |
| 238 | 238 | fwrite($file, "TOU=\"\"\n"); |
| 239 | 239 | } else { |
| 240 | - fwrite($file, "TOU=\"" . $tou . "\"\n"); |
|
| 240 | + fwrite($file, "TOU=\"".$tou."\"\n"); |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | - fwrite($file, "CA_CERTIFICATE=\"" . $this->mkCAfile() . "\"\n"); |
|
| 243 | + fwrite($file, "CA_CERTIFICATE=\"".$this->mkCAfile()."\"\n"); |
|
| 244 | 244 | $sbUserFile = $this->mkSbUserFile(); |
| 245 | 245 | if ($sbUserFile !== '') { |
| 246 | - fwrite($file, "SB_USER_FILE=\"" . $sbUserFile . "\"\n"); |
|
| 246 | + fwrite($file, "SB_USER_FILE=\"".$sbUserFile."\"\n"); |
|
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | } |
| 296 | 296 | $out .= "'DNS:$oneServer'"; |
| 297 | 297 | } |
| 298 | - return "(" . $out. ")"; |
|
| 298 | + return "(".$out.")"; |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /** |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | foreach ($ssids as $ssid => $cipher) { |
| 310 | 310 | $outArray[] = "'$ssid'"; |
| 311 | 311 | } |
| 312 | - return '(' . implode(' ', $outArray) . ')'; |
|
| 312 | + return '('.implode(' ', $outArray).')'; |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | /** |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $outArray[] = "'$ssid'"; |
| 326 | 326 | } |
| 327 | 327 | } |
| 328 | - return '(' . implode(', ', $outArray) . ')'; |
|
| 328 | + return '('.implode(', ', $outArray).')'; |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | /** |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | * |
| 334 | 334 | * @return string |
| 335 | 335 | */ |
| 336 | - private function mkCAfile(){ |
|
| 336 | + private function mkCAfile() { |
|
| 337 | 337 | $out = ''; |
| 338 | 338 | $cAlist = $this->attributes['internal:CAs'][0]; |
| 339 | 339 | foreach ($cAlist as $oneCa) { |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | */ |
| 350 | 350 | private function mkIntro() { |
| 351 | 351 | \core\common\Entity::intoThePotatoes(); |
| 352 | - $out = _("This installer has been prepared for %s") . '\n\n' . _("More information and comments:") . '\n\nE-Mail: %s\nWWW: %s\n\n' . |
|
| 352 | + $out = _("This installer has been prepared for %s").'\n\n'._("More information and comments:").'\n\nE-Mail: %s\nWWW: %s\n\n'. |
|
| 353 | 353 | _("Installer created with software from the GEANT project."); |
| 354 | 354 | \core\common\Entity::outOfThePotatoes(); |
| 355 | 355 | return $out; |
@@ -203,8 +203,7 @@ |
||
| 203 | 203 | |
| 204 | 204 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { |
| 205 | 205 | $configRaw['USE_OTHER_TLS_ID'] = true; |
| 206 | - } |
|
| 207 | - else { |
|
| 206 | + } else { |
|
| 208 | 207 | $configRaw['USE_OTHER_TLS_ID'] = false; |
| 209 | 208 | } |
| 210 | 209 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | ?> |
| 28 | 28 | <?php |
| 29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 30 | 30 | |
| 31 | 31 | $auth = new \web\lib\admin\Authentication(); |
| 32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert |
| 82 | 82 | $status = $oneCert['STATUS']; |
| 83 | 83 | if ($status == "ISSUED") { |
| 84 | - $status = "<span onclick='alert(\"".str_replace("\n","\\n",$oneCert['CERT'])."\");'>$status</span>"; |
|
| 84 | + $status = "<span onclick='alert(\"".str_replace("\n", "\\n", $oneCert['CERT'])."\");'>$status</span>"; |
|
| 85 | 85 | } |
| 86 | 86 | echo "<tr><td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td></tr>"; |
| 87 | 87 | } |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | * @author Tomasz Wolniewicz <[email protected]> |
| 36 | 36 | * @package ModuleWriting |
| 37 | 37 | */ |
| 38 | - class DeviceW8W10 extends WindowsCommon |
|
| 39 | - { |
|
| 38 | + class DeviceW8W10 extends WindowsCommon |
|
| 39 | + { |
|
| 40 | 40 | final public function __construct() { |
| 41 | 41 | parent::__construct(); |
| 42 | 42 | \core\common\Entity::intoThePotatoes(); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | foreach ($this->attributes['internal:consortia'] as $oneCons) { |
| 98 | 98 | $knownOiName = array_search($oneCons, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']); |
| 99 | 99 | if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one! |
| 100 | - $knownOiName = $this->attributes['general:instname'][0] . " "._("Roaming Partner") . " $roamingPartner"; |
|
| 100 | + $knownOiName = $this->attributes['general:instname'][0]." "._("Roaming Partner")." $roamingPartner"; |
|
| 101 | 101 | $roamingPartner++; |
| 102 | 102 | } |
| 103 | 103 | $ssid = 'cat-passpoint-profile'; |
@@ -149,12 +149,12 @@ discard block |
||
| 149 | 149 | if (empty($this->attributes['internal:realm'][0])) { |
| 150 | 150 | $retval .= \config\ConfAssistant::CONSORTIUM['interworking-domainname-fallback']; |
| 151 | 151 | } else { |
| 152 | - $retval .= $this->attributes['internal:realm'][0]; |
|
| 152 | + $retval .= $this->attributes['internal:realm'][0]; |
|
| 153 | 153 | } |
| 154 | 154 | $retval .= '</DomainName>'; |
| 155 | - $retval .= '<RoamingConsortium><OUI>' . $oi . |
|
| 155 | + $retval .= '<RoamingConsortium><OUI>'.$oi. |
|
| 156 | 156 | '</OUI></RoamingConsortium>'; |
| 157 | - $retval .= '</Hotspot2>'; |
|
| 157 | + $retval .= '</Hotspot2>'; |
|
| 158 | 158 | return($retval); |
| 159 | 159 | } |
| 160 | 160 | |
@@ -163,11 +163,11 @@ discard block |
||
| 163 | 163 | $profileFileCont = '<EAPConfig><EapHostConfig xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
| 164 | 164 | <EapMethod> |
| 165 | 165 | '; |
| 166 | - $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">' . |
|
| 167 | - $this->selectedEap["OUTER"] . '</Type> |
|
| 166 | + $profileFileCont .= '<Type xmlns="http://www.microsoft.com/provisioning/EapCommon">'. |
|
| 167 | + $this->selectedEap["OUTER"].'</Type> |
|
| 168 | 168 | <VendorId xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorId> |
| 169 | 169 | <VendorType xmlns="http://www.microsoft.com/provisioning/EapCommon">0</VendorType> |
| 170 | -<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId . '</AuthorId> |
|
| 170 | +<AuthorId xmlns="http://www.microsoft.com/provisioning/EapCommon">' . $authorId.'</AuthorId> |
|
| 171 | 171 | </EapMethod> |
| 172 | 172 | '; |
| 173 | 173 | return($profileFileCont); |
@@ -178,10 +178,10 @@ discard block |
||
| 178 | 178 | <eapTls:ServerValidation> |
| 179 | 179 | <eapTls:DisableUserPromptForServerValidation>true</eapTls:DisableUserPromptForServerValidation> |
| 180 | 180 | '; |
| 181 | - $profileFileCont .= '<eapTls:ServerNames>' . $this->servers . '</eapTls:ServerNames>'; |
|
| 181 | + $profileFileCont .= '<eapTls:ServerNames>'.$this->servers.'</eapTls:ServerNames>'; |
|
| 182 | 182 | foreach ($this->caArray as $certAuthority) { |
| 183 | 183 | if ($certAuthority['root']) { |
| 184 | - $profileFileCont .= "<eapTls:TrustedRootCA>" . $certAuthority['sha1'] . "</eapTls:TrustedRootCA>\n"; |
|
| 184 | + $profileFileCont .= "<eapTls:TrustedRootCA>".$certAuthority['sha1']."</eapTls:TrustedRootCA>\n"; |
|
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | $profileFileCont .= '</eapTls:ServerValidation> |
@@ -193,10 +193,10 @@ discard block |
||
| 193 | 193 | $profileFileCont = ' |
| 194 | 194 | <ServerValidation> |
| 195 | 195 | '; |
| 196 | - $profileFileCont .= '<ServerNames>' . $this->servers . '</ServerNames> '; |
|
| 196 | + $profileFileCont .= '<ServerNames>'.$this->servers.'</ServerNames> '; |
|
| 197 | 197 | foreach ($this->caArray as $certAuthority) { |
| 198 | 198 | if ($certAuthority['root']) { |
| 199 | - $profileFileCont .= "<TrustedRootCAHash>" . chunk_split($certAuthority['sha1'], 2, ' ') . "</TrustedRootCAHash>\n"; |
|
| 199 | + $profileFileCont .= "<TrustedRootCAHash>".chunk_split($certAuthority['sha1'], 2, ' ')."</TrustedRootCAHash>\n"; |
|
| 200 | 200 | } |
| 201 | 201 | } |
| 202 | 202 | $profileFileCont .= '<DisablePrompt>true</DisablePrompt> |
@@ -228,10 +228,10 @@ discard block |
||
| 228 | 228 | $profileFileCont = ' |
| 229 | 229 | <ServerValidation> |
| 230 | 230 | <DisableUserPromptForServerValidation>true</DisableUserPromptForServerValidation> |
| 231 | -<ServerNames>' . $this->servers . '</ServerNames>'; |
|
| 231 | +<ServerNames>' . $this->servers.'</ServerNames>'; |
|
| 232 | 232 | foreach ($this->caArray as $certAuthority) { |
| 233 | 233 | if ($certAuthority['root']) { |
| 234 | - $profileFileCont .= "<TrustedRootCA>" . $certAuthority['sha1'] . "</TrustedRootCA>\n"; |
|
| 234 | + $profileFileCont .= "<TrustedRootCA>".$certAuthority['sha1']."</TrustedRootCA>\n"; |
|
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | 237 | $profileFileCont .= '</ServerValidation> |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | if ($this->useAnon) { |
| 288 | 288 | $profileFileCont .= '<IdentityPrivacy>true</IdentityPrivacy> |
| 289 | 289 | '; |
| 290 | - $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity> |
|
| 290 | + $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity> |
|
| 291 | 291 | '; |
| 292 | 292 | } else { |
| 293 | 293 | $profileFileCont .= '<IdentityPrivacy>false</IdentityPrivacy> |
@@ -304,10 +304,10 @@ discard block |
||
| 304 | 304 | $profileFileCont = ' |
| 305 | 305 | <Config xmlns="http://www.microsoft.com/provisioning/EapHostConfig"> |
| 306 | 306 | <EAPIdentityProviderList xmlns="urn:ietf:params:xml:ns:yang:ietf-eap-metadata"> |
| 307 | -<EAPIdentityProvider ID="' . $this->deviceUUID . '" namespace="urn:UUID"> |
|
| 307 | +<EAPIdentityProvider ID="' . $this->deviceUUID.'" namespace="urn:UUID"> |
|
| 308 | 308 | |
| 309 | 309 | <ProviderInfo> |
| 310 | -<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage) . '</DisplayName> |
|
| 310 | +<DisplayName>' . $this->translateString($this->attributes['general:instname'][0], $this->codePage).'</DisplayName> |
|
| 311 | 311 | </ProviderInfo> |
| 312 | 312 | <AuthenticationMethods> |
| 313 | 313 | <AuthenticationMethod> |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | if ($this->outerUser == '') { |
| 320 | 320 | $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
| 321 | 321 | } else { |
| 322 | - $profileFileCont .= '<AnonymousIdentity>' . $this->outerId . '</AnonymousIdentity>'; |
|
| 322 | + $profileFileCont .= '<AnonymousIdentity>'.$this->outerId.'</AnonymousIdentity>'; |
|
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | $profileFileCont .= '</ClientSideCredential> |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | $profileFileCont .= $this->glTtlsServerValidation(); |
| 328 | 328 | $profileFileCont .= ' |
| 329 | 329 | <InnerAuthenticationMethod> |
| 330 | -<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'] . '</NonEAPAuthMethod> |
|
| 330 | +<NonEAPAuthMethod>' . \core\common\EAP::eapDisplayName($this->selectedEap)['INNER'].'</NonEAPAuthMethod> |
|
| 331 | 331 | </InnerAuthenticationMethod> |
| 332 | 332 | <VendorSpecific> |
| 333 | 333 | <SessionResumption>false</SessionResumption> |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | <UseWinLogonCredentials>false</UseWinLogonCredentials> |
| 359 | 359 | </EapType> |
| 360 | 360 | </Eap> |
| 361 | -<EnableQuarantineChecks>' . $nea . '</EnableQuarantineChecks> |
|
| 361 | +<EnableQuarantineChecks>' . $nea.'</EnableQuarantineChecks> |
|
| 362 | 362 | <RequireCryptoBinding>false</RequireCryptoBinding> |
| 363 | 363 | '; |
| 364 | 364 | if ($this->useAnon) { |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | $profileFileCont .= '<AnonymousUserName/> |
| 371 | 371 | '; |
| 372 | 372 | } else { |
| 373 | - $profileFileCont .= '<AnonymousUserName>' . $this->outerUser . '</AnonymousUserName> |
|
| 373 | + $profileFileCont .= '<AnonymousUserName>'.$this->outerUser.'</AnonymousUserName> |
|
| 374 | 374 | '; |
| 375 | 375 | } |
| 376 | 376 | $profileFileCont .= '</IdentityPrivacy> |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | private function prepareEapConfig() { |
| 401 | 401 | if ($this->useAnon) { |
| 402 | 402 | $this->outerUser = $this->attributes['internal:anon_local_value'][0]; |
| 403 | - $this->outerId = $this->outerUser . '@' . $this->attributes['internal:realm'][0]; |
|
| 403 | + $this->outerId = $this->outerUser.'@'.$this->attributes['internal:realm'][0]; |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | $profileFileCont = $this->eapConfigHeader(); |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | default: |
| 426 | 426 | break; |
| 427 | 427 | } |
| 428 | - return(['win' => $profileFileCont . '</EapHostConfig></EAPConfig>']); |
|
| 428 | + return(['win' => $profileFileCont.'</EapHostConfig></EAPConfig>']); |
|
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | /** |
@@ -443,10 +443,10 @@ discard block |
||
| 443 | 443 | private function writeWLANprofile($wlanProfileName, $ssid, $auth, $encryption, $eapConfig, $profileNumber, $oi = '') { |
| 444 | 444 | $profileFileCont = '<?xml version="1.0"?> |
| 445 | 445 | <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> |
| 446 | -<name>' . $wlanProfileName . '</name> |
|
| 446 | +<name>' . $wlanProfileName.'</name> |
|
| 447 | 447 | <SSIDConfig> |
| 448 | 448 | <SSID> |
| 449 | -<name>' . $ssid . '</name> |
|
| 449 | +<name>' . $ssid.'</name> |
|
| 450 | 450 | </SSID> |
| 451 | 451 | <nonBroadcast>true</nonBroadcast> |
| 452 | 452 | </SSIDConfig>'; |
@@ -458,8 +458,8 @@ discard block |
||
| 458 | 458 | <MSM> |
| 459 | 459 | <security> |
| 460 | 460 | <authEncryption> |
| 461 | -<authentication>' . $auth . '</authentication> |
|
| 462 | -<encryption>' . $encryption . '</encryption> |
|
| 461 | +<authentication>' . $auth.'</authentication> |
|
| 462 | +<encryption>' . $encryption.'</encryption> |
|
| 463 | 463 | <useOneX>true</useOneX> |
| 464 | 464 | </authEncryption> |
| 465 | 465 | '; |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | mkdir('w8'); |
| 487 | 487 | } |
| 488 | 488 | $xmlFname = "w8/wlan_prof-$profileNumber.xml"; |
| 489 | - file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing); |
|
| 489 | + file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing); |
|
| 490 | 490 | $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n"); |
| 491 | 491 | $hs20 = $oi == '' ? 0 : 1; |
| 492 | 492 | return("\"$wlanProfileName\" \"$encryption\" $hs20"); |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | mkdir('w8'); |
| 515 | 515 | } |
| 516 | 516 | $xmlFname = "w8/lan_prof.xml"; |
| 517 | - file_put_contents($xmlFname, $profileFileCont . $eapConfig['win'] . $closing); |
|
| 517 | + file_put_contents($xmlFname, $profileFileCont.$eapConfig['win'].$closing); |
|
| 518 | 518 | $this->loggerInstance->debug(2, "Installer has been written into directory $this->FPATH\n"); |
| 519 | 519 | } |
| 520 | 520 | |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | } |
| 536 | 536 | foreach ($caArray as $certAuthority) { |
| 537 | 537 | $store = $certAuthority['root'] ? "root" : "ca"; |
| 538 | - $fcontentsCerts .= '!insertmacro install_ca_cert "' . $certAuthority['file'] . '" "' . $certAuthority['sha1'] . '" "' . $store . "\"\n"; |
|
| 538 | + $fcontentsCerts .= '!insertmacro install_ca_cert "'.$certAuthority['file'].'" "'.$certAuthority['sha1'].'" "'.$store."\"\n"; |
|
| 539 | 539 | } |
| 540 | 540 | fwrite($fileHandleCerts, $fcontentsCerts); |
| 541 | 541 | fclose($fileHandleCerts); |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | private function writeMainNSH($eap, $attr) { |
| 545 | 545 | $this->loggerInstance->debug(4, "writeMainNSH"); |
| 546 | 546 | $this->loggerInstance->debug(4, $attr); |
| 547 | - $this->loggerInstance->debug(4, "Device_id = " . $this->device_id . "\n"); |
|
| 547 | + $this->loggerInstance->debug(4, "Device_id = ".$this->device_id."\n"); |
|
| 548 | 548 | $fcontents = "!define W8\n"; |
| 549 | 549 | if ($this->device_id == 'w10') { |
| 550 | 550 | $fcontents .= "!define W10\n"; |
@@ -574,8 +574,8 @@ discard block |
||
| 574 | 574 | if ($eap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
| 575 | 575 | $fcontents .= "!define SILVERBULLET\n"; |
| 576 | 576 | } |
| 577 | - $fcontents .= '!define ' . $eapStr; |
|
| 578 | - $fcontents .= "\n" . '!define EXECLEVEL "' . $execLevel . '"'; |
|
| 577 | + $fcontents .= '!define '.$eapStr; |
|
| 578 | + $fcontents .= "\n".'!define EXECLEVEL "'.$execLevel.'"'; |
|
| 579 | 579 | $fcontents .= $this->writeNsisDefines($attr); |
| 580 | 580 | file_put_contents('main.nsh', $fcontents); |
| 581 | 581 | } |
@@ -774,7 +774,7 @@ |
||
| 774 | 774 | \core\common\Entity::$nomenclature_inst, |
| 775 | 775 | count($this->CAsAccountedFor)+1, |
| 776 | 776 | ($ca['root'] ? _("Root") : _("Intermediate"))) . |
| 777 | - "</string> |
|
| 777 | + "</string> |
|
| 778 | 778 | <key>PayloadIdentifier</key> |
| 779 | 779 | <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
| 780 | 780 | <key>PayloadOrganization</key> |
@@ -179,15 +179,15 @@ discard block |
||
| 179 | 179 | <key>PayloadDescription</key> |
| 180 | 180 | <string>$tagline</string> |
| 181 | 181 | <key>PayloadDisplayName</key> |
| 182 | - <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . "</string> |
|
| 182 | + <string>".\config\ConfAssistant::CONSORTIUM['display_name']."</string> |
|
| 183 | 183 | <key>PayloadIdentifier</key> |
| 184 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
| 184 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
| 185 | 185 | <key>PayloadOrganization</key> |
| 186 | - <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
| 186 | + <string>".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8').($this->attributes['internal:profile_count'][0] > 1 ? " (".htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8').")" : "")."</string> |
|
| 187 | 187 | <key>PayloadType</key> |
| 188 | 188 | <string>Configuration</string> |
| 189 | 189 | <key>PayloadUUID</key> |
| 190 | - <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string> |
|
| 190 | + <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string> |
|
| 191 | 191 | <key>PayloadVersion</key> |
| 192 | 192 | <integer>1</integer>"; |
| 193 | 193 | \core\common\Entity::outOfThePotatoes(); |
@@ -219,16 +219,16 @@ discard block |
||
| 219 | 219 | { |
| 220 | 220 | \core\common\Entity::intoThePotatoes(); |
| 221 | 221 | if (isset($this->attributes['support:info_file'])) { |
| 222 | - return MobileconfigSuperclass::BUFFER_CONSENT_PRE . htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8') . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
| 222 | + return MobileconfigSuperclass::BUFFER_CONSENT_PRE.htmlspecialchars(iconv("UTF-8", "UTF-8//TRANSLIT", $this->attributes['support:info_file'][0]), ENT_XML1, 'UTF-8').MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
| 223 | 223 | } |
| 224 | 224 | if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) { |
| 225 | 225 | if (strlen($this->attributes['internal:realm'][0]) > 0) { |
| 226 | 226 | /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username! |
| 227 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username must end with @%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
| 227 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username must end with @%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
| 228 | 228 | \core\common\Entity::outOfThePotatoes(); |
| 229 | 229 | return $retval; |
| 230 | 230 | } |
| 231 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . _("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.") . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
| 231 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE._("Important Notice: your username MUST be in the form of xxx@yyy where the yyy is a common suffix identifying your Identity Provider. Please find out what to use there and enter the username in the correct format.").MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
| 232 | 232 | \core\common\Entity::outOfThePotatoes(); |
| 233 | 233 | return $retval; |
| 234 | 234 | } |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | // also escape htmlspecialchars |
| 252 | 252 | // not all names and profiles have a name, so be prepared |
| 253 | 253 | |
| 254 | - $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE)); |
|
| 254 | + $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE)); |
|
| 255 | 255 | |
| 256 | 256 | $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation"); |
| 257 | 257 | $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile"); |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | file_put_contents('installer_profile', $outputXml); |
| 295 | 295 | |
| 296 | - $fileName = $this->installerBasename . '.mobileconfig'; |
|
| 296 | + $fileName = $this->installerBasename.'.mobileconfig'; |
|
| 297 | 297 | |
| 298 | 298 | if (!$this->sign) { |
| 299 | 299 | rename("installer_profile", $fileName); |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | return $fileName; |
| 302 | 302 | } |
| 303 | 303 | // still here? Then we are signing. |
| 304 | - $signing = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
| 304 | + $signing = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
| 305 | 305 | if ($signing === FALSE) { |
| 306 | 306 | $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n"); |
| 307 | 307 | } |
@@ -320,19 +320,19 @@ discard block |
||
| 320 | 320 | \core\common\Entity::intoThePotatoes(); |
| 321 | 321 | $ssidCount = count($this->attributes['internal:SSID']); |
| 322 | 322 | $certCount = count($this->attributes['internal:CAs'][0]); |
| 323 | - $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>"; |
|
| 323 | + $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>"; |
|
| 324 | 324 | $out .= "<p>"; |
| 325 | 325 | $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:"); |
| 326 | 326 | $out .= "<ul>"; |
| 327 | - $out .= "<li>" . _("to install the profile") . "</li>"; |
|
| 328 | - $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
| 327 | + $out .= "<li>"._("to install the profile")."</li>"; |
|
| 328 | + $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
| 329 | 329 | if ($certCount > 1) { |
| 330 | - $out .= " " . sprintf(_("(%d times)"), $certCount); |
|
| 330 | + $out .= " ".sprintf(_("(%d times)"), $certCount); |
|
| 331 | 331 | } |
| 332 | 332 | $out .= "</li>"; |
| 333 | - $out .= "<li>" . _("to enter the username and password you have been given by your organisation"); |
|
| 333 | + $out .= "<li>"._("to enter the username and password you have been given by your organisation"); |
|
| 334 | 334 | if ($ssidCount > 1) { |
| 335 | - $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
| 335 | + $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
| 336 | 336 | } |
| 337 | 337 | $out .= "</li>"; |
| 338 | 338 | $out .= "</ul>"; |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | <key>ServiceProviderRoamingEnabled</key> |
| 373 | 373 | <true/> |
| 374 | 374 | <key>DisplayedOperatorName</key> |
| 375 | - <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . " via Passpoint</string>"; |
|
| 375 | + <string>" . \config\ConfAssistant::CONSORTIUM['display_name']." via Passpoint</string>"; |
|
| 376 | 376 | // if we don't know the realm, omit the entire DomainName key |
| 377 | 377 | if (isset($this->attributes['internal:realm'])) { |
| 378 | 378 | $retval .= "<key>DomainName</key> |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | $retval .= " <key>RoamingConsortiumOIs</key> |
| 385 | 385 | <array>"; |
| 386 | 386 | |
| 387 | - $retval .= "<string>" . strtoupper($consortiumOi) . "</string>"; |
|
| 387 | + $retval .= "<string>".strtoupper($consortiumOi)."</string>"; |
|
| 388 | 388 | |
| 389 | 389 | $retval .= "</array>"; |
| 390 | 390 | // this is an undocumented value found on the net. Does it do something useful? |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | <dict> |
| 422 | 422 | <key>AcceptEAPTypes</key> |
| 423 | 423 | <array> |
| 424 | - <integer>" . $eapType['OUTER'] . "</integer> |
|
| 424 | + <integer>" . $eapType['OUTER']."</integer> |
|
| 425 | 425 | </array> |
| 426 | 426 | <key>EAPFASTProvisionPAC</key> |
| 427 | 427 | <true /> |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | "; |
| 435 | 435 | if ($realm !== NULL) { |
| 436 | 436 | $retval .= "<key>OuterIdentity</key> |
| 437 | - <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string> |
|
| 437 | + <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string> |
|
| 438 | 438 | "; |
| 439 | 439 | } |
| 440 | 440 | $retval .= "<key>PayloadCertificateAnchorUUID</key> |
@@ -458,11 +458,11 @@ discard block |
||
| 458 | 458 | $retval .= " |
| 459 | 459 | </array>"; |
| 460 | 460 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
| 461 | - $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>"; |
|
| 461 | + $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>"; |
|
| 462 | 462 | } |
| 463 | 463 | $retval .= " |
| 464 | 464 | <key>TTLSInnerAuthentication</key> |
| 465 | - <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2") . "</string> |
|
| 465 | + <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2")."</string> |
|
| 466 | 466 | </dict>"; |
| 467 | 467 | return $retval; |
| 468 | 468 | } |
@@ -482,9 +482,9 @@ discard block |
||
| 482 | 482 | // characters are still reversed, invert on use! |
| 483 | 483 | $buffer .= "<string>Manual</string> |
| 484 | 484 | <key>ProxyServer</key> |
| 485 | - <string>" . strrev($serverAndPort[1]) . "</string> |
|
| 485 | + <string>" . strrev($serverAndPort[1])."</string> |
|
| 486 | 486 | <key>ProxyServerPort</key> |
| 487 | - <integer>" . strrev($serverAndPort[0]) . "</integer> |
|
| 487 | + <integer>" . strrev($serverAndPort[0])."</integer> |
|
| 488 | 488 | <key>ProxyPACFallbackAllowed</key> |
| 489 | 489 | <false/>"; |
| 490 | 490 | } else { |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | throw new Exception("SSID must be a string!"); |
| 514 | 514 | } |
| 515 | 515 | $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8'); |
| 516 | - $payloadIdentifier = "wifi." . $this->serial; |
|
| 516 | + $payloadIdentifier = "wifi.".$this->serial; |
|
| 517 | 517 | $payloadShortName = sprintf(_("SSID %s"), $escapedSSID); |
| 518 | 518 | $payloadName = sprintf(_("%s configuration for network name %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $escapedSSID); |
| 519 | 519 | $encryptionTypeString = "WPA"; |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | $payloadIdentifier = "hs20.$toBeConfigured"; |
| 544 | 544 | $knownOiName = array_search($toBeConfigured, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']); |
| 545 | 545 | if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one! |
| 546 | - $knownOiName = $this->instName . " "._("Roaming Partner"); |
|
| 546 | + $knownOiName = $this->instName." "._("Roaming Partner"); |
|
| 547 | 547 | } |
| 548 | 548 | $payloadShortName = $knownOiName; |
| 549 | 549 | $payloadName = _("Passpoint roaming configuration ($knownOiName)"); |
@@ -565,11 +565,11 @@ discard block |
||
| 565 | 565 | <key>PayloadDisplayName</key> |
| 566 | 566 | <string>$payloadShortName</string> |
| 567 | 567 | <key>PayloadIdentifier</key> |
| 568 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
| 568 | + <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
| 569 | 569 | <key>PayloadOrganization</key> |
| 570 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
| 570 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
| 571 | 571 | <key>PayloadType</key> |
| 572 | - <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>"; |
|
| 572 | + <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>"; |
|
| 573 | 573 | $retval .= $this->proxySettings(); |
| 574 | 574 | $retval .= $setupModesString; |
| 575 | 575 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | } |
| 582 | 582 | $retval .= " |
| 583 | 583 | <key>PayloadUUID</key> |
| 584 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
| 584 | + <string>" . \core\common\Entity::uuid()."</string> |
|
| 585 | 585 | <key>PayloadVersion</key> |
| 586 | 586 | <integer>1</integer> |
| 587 | 587 | $wifiNetworkIdentification</dict>"; |
@@ -611,15 +611,15 @@ discard block |
||
| 611 | 611 | <key>IsHotspot</key> |
| 612 | 612 | <false/> |
| 613 | 613 | <key>PayloadDescription</key> |
| 614 | - <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string> |
|
| 614 | + <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string> |
|
| 615 | 615 | <key>PayloadDisplayName</key> |
| 616 | - <string>" . _("Disabled WiFi network") . "</string> |
|
| 616 | + <string>" . _("Disabled WiFi network")."</string> |
|
| 617 | 617 | <key>PayloadIdentifier</key> |
| 618 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
| 618 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
| 619 | 619 | <key>PayloadType</key> |
| 620 | 620 | <string>com.apple.wifi.managed</string> |
| 621 | 621 | <key>PayloadUUID</key> |
| 622 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
| 622 | + <string>".\core\common\Entity::uuid()."</string> |
|
| 623 | 623 | <key>PayloadVersion</key> |
| 624 | 624 | <real>1</real>"; |
| 625 | 625 | $retval .= $this->proxySettings(); |
@@ -698,12 +698,12 @@ discard block |
||
| 698 | 698 | $mimeBlob = base64_encode($binaryBlob); |
| 699 | 699 | $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n"); |
| 700 | 700 | $payloadUUID = \core\common\Entity::uuid('', $mimeBlob); |
| 701 | - $retArray = ["block" => "<dict>" . |
|
| 701 | + $retArray = ["block" => "<dict>". |
|
| 702 | 702 | // we don't include the import password. It's displayed on screen, and should be input by the user. |
| 703 | 703 | // <key>Password</key> |
| 704 | 704 | // <string>" . $this->clientCert['password'] . "</string> |
| 705 | 705 | "<key>PayloadCertificateFileName</key> |
| 706 | - <string>" . $this->massagedConsortium . ".pfx</string> |
|
| 706 | + <string>" . $this->massagedConsortium.".pfx</string> |
|
| 707 | 707 | <key>PayloadContent</key> |
| 708 | 708 | <data> |
| 709 | 709 | $mimeFormatted |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | <key>PayloadDescription</key> |
| 712 | 712 | <string>MIME Base-64 encoded PKCS#12 Client Certificate</string> |
| 713 | 713 | <key>PayloadDisplayName</key> |
| 714 | - <string>" . _("eduroam user certificate") . "</string> |
|
| 714 | + <string>"._("eduroam user certificate")."</string> |
|
| 715 | 715 | <key>PayloadIdentifier</key> |
| 716 | 716 | <string>com.apple.security.pkcs12.$payloadUUID</string> |
| 717 | 717 | <key>PayloadType</key> |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | <key>PayloadVersion</key> |
| 722 | 722 | <integer>1</integer> |
| 723 | 723 | </dict>", |
| 724 | - "UUID" => $payloadUUID,]; |
|
| 724 | + "UUID" => $payloadUUID, ]; |
|
| 725 | 725 | \core\common\Entity::outOfThePotatoes(); |
| 726 | 726 | return $retArray; |
| 727 | 727 | } |
@@ -739,7 +739,7 @@ discard block |
||
| 739 | 739 | } |
| 740 | 740 | $expiryTime = new \DateTime($this->clientCert['certObject']->expiry); |
| 741 | 741 | return "<key>RemovalDate</key> |
| 742 | - <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>"; |
|
| 742 | + <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>"; |
|
| 743 | 743 | } |
| 744 | 744 | |
| 745 | 745 | /** |
@@ -761,27 +761,27 @@ discard block |
||
| 761 | 761 | $stream = " |
| 762 | 762 | <dict> |
| 763 | 763 | <key>PayloadCertificateFileName</key> |
| 764 | - <string>" . $ca['uuid'] . ".der</string> |
|
| 764 | + <string>" . $ca['uuid'].".der</string> |
|
| 765 | 765 | <key>PayloadContent</key> |
| 766 | 766 | <data> |
| 767 | -" . $trimmedPem . "</data> |
|
| 767 | +" . $trimmedPem."</data> |
|
| 768 | 768 | <key>PayloadDescription</key> |
| 769 | - <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
| 769 | + <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string> |
|
| 770 | 770 | <key>PayloadDisplayName</key> |
| 771 | 771 | <string>" . |
| 772 | 772 | /// example: "Identity Provider CA #1 (Root)" |
| 773 | - sprintf(_("%s CA #%d (%s)" ), |
|
| 773 | + sprintf(_("%s CA #%d (%s)"), |
|
| 774 | 774 | \core\common\Entity::$nomenclature_inst, |
| 775 | - count($this->CAsAccountedFor)+1, |
|
| 776 | - ($ca['root'] ? _("Root") : _("Intermediate"))) . |
|
| 775 | + count($this->CAsAccountedFor) + 1, |
|
| 776 | + ($ca['root'] ? _("Root") : _("Intermediate"))). |
|
| 777 | 777 | "</string> |
| 778 | 778 | <key>PayloadIdentifier</key> |
| 779 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
| 779 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
| 780 | 780 | <key>PayloadOrganization</key> |
| 781 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
| 781 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
| 782 | 782 | <key>PayloadType</key> |
| 783 | 783 | <string>com.apple.security.root</string> |
| 784 | - <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string> |
|
| 784 | + <key>PayloadUUID</key><string>" . $ca['uuid']."</string> |
|
| 785 | 785 | <key>PayloadVersion</key> |
| 786 | 786 | <integer>1</integer> |
| 787 | 787 | </dict>"; |
@@ -66,24 +66,24 @@ discard block |
||
| 66 | 66 | case "EXTERNAL": |
| 67 | 67 | case "FRONTEND": |
| 68 | 68 | case "DIAGNOSTICS": |
| 69 | - if (!isset(self::${"instance" . $theDb})) { |
|
| 69 | + if (!isset(self::${"instance".$theDb})) { |
|
| 70 | 70 | $class = __CLASS__; |
| 71 | - self::${"instance" . $theDb} = new $class($database); |
|
| 72 | - DBConnection::${"instance" . $theDb}->databaseInstance = $theDb; |
|
| 71 | + self::${"instance".$theDb} = new $class($database); |
|
| 72 | + DBConnection::${"instance".$theDb}->databaseInstance = $theDb; |
|
| 73 | 73 | } |
| 74 | - return self::${"instance" . $theDb}; |
|
| 74 | + return self::${"instance".$theDb}; |
|
| 75 | 75 | case "RADIUS": |
| 76 | - if (!isset(self::${"instance" . $theDb})) { |
|
| 76 | + if (!isset(self::${"instance".$theDb})) { |
|
| 77 | 77 | $class = __CLASS__; |
| 78 | 78 | foreach (\config\ConfAssistant::DB as $name => $oneRadiusAuthDb) { |
| 79 | 79 | $theInstance = new $class($name); |
| 80 | - self::${"instance" . $theDb}[] = $theInstance; |
|
| 80 | + self::${"instance".$theDb}[] = $theInstance; |
|
| 81 | 81 | $theInstance->databaseInstance = $theDb; |
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | - return self::${"instance" . $theDb}; |
|
| 84 | + return self::${"instance".$theDb}; |
|
| 85 | 85 | default: |
| 86 | - throw new Exception("This type of database (" . strtoupper($database) . ") is not known!"); |
|
| 86 | + throw new Exception("This type of database (".strtoupper($database).") is not known!"); |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | |
@@ -125,18 +125,18 @@ discard block |
||
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | // log exact query to debug log, if log level is at 5 |
| 128 | - $this->loggerInstance->debug(5, "DB ATTEMPT: " . $querystring . "\n"); |
|
| 128 | + $this->loggerInstance->debug(5, "DB ATTEMPT: ".$querystring."\n"); |
|
| 129 | 129 | if ($types !== NULL) { |
| 130 | - $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . print_r($arguments, true)); |
|
| 130 | + $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: ".print_r($arguments, true)); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | if ($this->connection->connect_error) { |
| 134 | - throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!"); |
|
| 134 | + throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!"); |
|
| 135 | 135 | } |
| 136 | 136 | if ($types === NULL) { |
| 137 | 137 | $result = $this->connection->query($querystring); |
| 138 | 138 | if ($result === FALSE) { |
| 139 | - throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--"); |
|
| 139 | + throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--"); |
|
| 140 | 140 | } |
| 141 | 141 | } else { |
| 142 | 142 | // fancy! prepared statement with dedicated argument list |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | $prepResult = $statementObject->prepare($querystring); |
| 154 | 154 | if ($prepResult === FALSE) { |
| 155 | - throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--."); |
|
| 155 | + throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--."); |
|
| 156 | 156 | } |
| 157 | 157 | $this->preparedStatements[$querystring] = $statementObject; |
| 158 | 158 | } |
@@ -165,11 +165,11 @@ discard block |
||
| 165 | 165 | array_unshift($localArray, $types); |
| 166 | 166 | $retval = call_user_func_array([$statementObject, "bind_param"], $localArray); |
| 167 | 167 | if ($retval === FALSE) { |
| 168 | - throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--"); |
|
| 168 | + throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--"); |
|
| 169 | 169 | } |
| 170 | 170 | $result = $statementObject->execute(); |
| 171 | 171 | if ($result === FALSE) { |
| 172 | - throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--"); |
|
| 172 | + throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--"); |
|
| 173 | 173 | } |
| 174 | 174 | $selectResult = $statementObject->get_result(); |
| 175 | 175 | if ($selectResult !== FALSE) { |
@@ -179,14 +179,14 @@ discard block |
||
| 179 | 179 | |
| 180 | 180 | // all cases where $result could be FALSE have been caught earlier |
| 181 | 181 | if ($this->connection->errno) { |
| 182 | - throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!"); |
|
| 182 | + throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!"); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | |
| 186 | 186 | if ($isMoreThanSelect) { |
| 187 | - $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring); |
|
| 187 | + $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring); |
|
| 188 | 188 | if ($types !== NULL) { |
| 189 | - $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . print_r($arguments, true)); |
|
| 189 | + $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: ".print_r($arguments, true)); |
|
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | return $result; |
@@ -281,13 +281,13 @@ discard block |
||
| 281 | 281 | if (isset(\config\Master::DB[$databaseCapitalised])) { |
| 282 | 282 | $this->connection = new \mysqli(\config\Master::DB[$databaseCapitalised]['host'], \config\Master::DB[$databaseCapitalised]['user'], \config\Master::DB[$databaseCapitalised]['pass'], \config\Master::DB[$databaseCapitalised]['db']); |
| 283 | 283 | if ($this->connection->connect_error) { |
| 284 | - throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ")."); |
|
| 284 | + throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.")."); |
|
| 285 | 285 | } |
| 286 | 286 | $this->readOnly = \config\Master::DB[$databaseCapitalised]['readonly']; |
| 287 | 287 | } else { // one of the RADIUS DBs |
| 288 | 288 | $this->connection = new \mysqli(\config\ConfAssistant::DB[$databaseCapitalised]['host'], \config\ConfAssistant::DB[$databaseCapitalised]['user'], \config\ConfAssistant::DB[$databaseCapitalised]['pass'], \config\ConfAssistant::DB[$databaseCapitalised]['db']); |
| 289 | 289 | if ($this->connection->connect_error) { |
| 290 | - throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ")."); |
|
| 290 | + throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.")."); |
|
| 291 | 291 | } |
| 292 | 292 | $this->readOnly = \config\ConfAssistant::DB[$databaseCapitalised]['readonly']; |
| 293 | 293 | } |
@@ -115,12 +115,12 @@ discard block |
||
| 115 | 115 | $this->name = $this->languageInstance->getLocalisedValue($this->getAttributes('general:instname')); |
| 116 | 116 | $eligibility = $this->eligibility(); |
| 117 | 117 | if (in_array(IdP::ELIGIBILITY_IDP, $eligibility) && in_array(IdP::ELIGIBILITY_SP, $eligibility)) { |
| 118 | - $eligType = IdP::TYPE_IDPSP . ""; |
|
| 118 | + $eligType = IdP::TYPE_IDPSP.""; |
|
| 119 | 119 | $this->type = $eligType; |
| 120 | 120 | } elseif (in_array(IdP::ELIGIBILITY_IDP, $eligibility)) { |
| 121 | - $eligType = IdP::TYPE_IDP . ""; |
|
| 121 | + $eligType = IdP::TYPE_IDP.""; |
|
| 122 | 122 | } else { |
| 123 | - $eligType = IdP::TYPE_SP . ""; |
|
| 123 | + $eligType = IdP::TYPE_SP.""; |
|
| 124 | 124 | } |
| 125 | 125 | $this->type = $eligType; |
| 126 | 126 | $this->loggerInstance->debug(3, "--- END Constructing new IdP object ... ---\n"); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function listProfiles(bool $activeOnly = FALSE) |
| 136 | 136 | { |
| 137 | - $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : ""); |
|
| 137 | + $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : ""); |
|
| 138 | 138 | $allProfiles = $this->databaseHandle->exec($query); |
| 139 | 139 | $returnarray = []; |
| 140 | 140 | // SELECT -> resource, not boolean |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $returnarray[] = $oneProfile; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - $this->loggerInstance->debug(4, "listProfiles: " . print_r($returnarray, true)); |
|
| 147 | + $this->loggerInstance->debug(4, "listProfiles: ".print_r($returnarray, true)); |
|
| 148 | 148 | return $returnarray; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function listDeployments(bool $activeOnly = FALSE) |
| 158 | 158 | { |
| 159 | - $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier" . ($activeOnly ? " AND status = " . AbstractDeployment::ACTIVE : ""); |
|
| 159 | + $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier".($activeOnly ? " AND status = ".AbstractDeployment::ACTIVE : ""); |
|
| 160 | 160 | $allDeployments = $this->databaseHandle->exec($query); |
| 161 | 161 | $returnarray = []; |
| 162 | 162 | // SELECT -> resource, not boolean |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $returnarray[] = new DeploymentManaged($this, $deploymentQuery->deployment_id); |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - $this->loggerInstance->debug(4, "listDeployments: " . print_r($returnarray, true)); |
|
| 167 | + $this->loggerInstance->debug(4, "listDeployments: ".print_r($returnarray, true)); |
|
| 168 | 168 | return $returnarray; |
| 169 | 169 | } |
| 170 | 170 | |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | case AbstractProfile::PROFILETYPE_SILVERBULLET: |
| 307 | 307 | $theProfile = new ProfileSilverbullet($identifier, $this); |
| 308 | 308 | $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1); |
| 309 | - $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); |
|
| 309 | + $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); |
|
| 310 | 310 | return $theProfile; |
| 311 | 311 | default: |
| 312 | 312 | throw new Exception("This type of profile is unknown and can not be added."); |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | public function getExternalDBId() |
| 448 | 448 | { |
| 449 | 449 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED |
| 450 | - $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
| 450 | + $idQuery = $this->databaseHandle->exec("SELECT external_db_id FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
| 451 | 451 | // SELECT -> it's a resource, not a boolean |
| 452 | 452 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) { |
| 453 | 453 | return FALSE; |
@@ -513,16 +513,16 @@ discard block |
||
| 513 | 513 | } |
| 514 | 514 | foreach ($baseline as $lang => $value) { |
| 515 | 515 | if (!key_exists($lang, $newvalues)) { |
| 516 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED"; |
|
| 516 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED"; |
|
| 517 | 517 | } else { |
| 518 | 518 | if ($value != $newvalues[$lang]) { |
| 519 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'"; |
|
| 519 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'"; |
|
| 520 | 520 | } |
| 521 | 521 | } |
| 522 | 522 | } |
| 523 | 523 | foreach ($newvalues as $lang => $value) { |
| 524 | 524 | if (!key_exists($lang, $baseline)) { |
| 525 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'"; |
|
| 525 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'"; |
|
| 526 | 526 | } |
| 527 | 527 | } |
| 528 | 528 | return $retval; |
@@ -116,9 +116,9 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | $attributesLowLevel = array_merge($this->deviceLevelAttributes, $this->eapLevelAttributes); |
| 118 | 118 | |
| 119 | - $this->loggerInstance->debug(5, "Device-Level Attributes: " . print_r($this->deviceLevelAttributes, true)); |
|
| 120 | - $this->loggerInstance->debug(5, "EAP-Level Attributes: " . print_r($this->eapLevelAttributes, true)); |
|
| 121 | - $this->loggerInstance->debug(5, "All low-Level Attributes: " . print_r($attributesLowLevel, true)); |
|
| 119 | + $this->loggerInstance->debug(5, "Device-Level Attributes: ".print_r($this->deviceLevelAttributes, true)); |
|
| 120 | + $this->loggerInstance->debug(5, "EAP-Level Attributes: ".print_r($this->eapLevelAttributes, true)); |
|
| 121 | + $this->loggerInstance->debug(5, "All low-Level Attributes: ".print_r($attributesLowLevel, true)); |
|
| 122 | 122 | |
| 123 | 123 | // now fetch and merge profile-level attributes if not already set on deeper level |
| 124 | 124 | |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - $this->loggerInstance->debug(5, "Merged Attributes: " . print_r($attributesLowLevel, true)); |
|
| 140 | + $this->loggerInstance->debug(5, "Merged Attributes: ".print_r($attributesLowLevel, true)); |
|
| 141 | 141 | |
| 142 | 142 | // now, fetch and merge IdP-wide attributes |
| 143 | 143 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | "row" => $attributeQuery->row, |
| 194 | 194 | "flag" => $optinfo['flag'], |
| 195 | 195 | "device" => ($devicesOrEAPMethods == "DEVICES" ? $attributeQuery->deviceormethod : NULL), |
| 196 | - "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep() )]; |
|
| 196 | + "eapmethod" => ($devicesOrEAPMethods == "DEVICES" ? 0 : (new \core\common\EAP($attributeQuery->deviceormethod))->getArrayRep())]; |
|
| 197 | 197 | } |
| 198 | 198 | return $temparray; |
| 199 | 199 | } |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | public function setAnonymousIDSupport($shallwe) |
| 304 | 304 | { |
| 305 | - $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = " . ($shallwe === true ? "1" : "0") . " WHERE profile_id = $this->identifier"); |
|
| 305 | + $this->databaseHandle->exec("UPDATE profile SET use_anon_outer = ".($shallwe === true ? "1" : "0")." WHERE profile_id = $this->identifier"); |
|
| 306 | 306 | } |
| 307 | 307 | |
| 308 | 308 | /** Toggle special username for realm checks |
@@ -313,8 +313,8 @@ discard block |
||
| 313 | 313 | */ |
| 314 | 314 | public function setRealmCheckUser($shallwe, $localpart = NULL) |
| 315 | 315 | { |
| 316 | - $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = " . ($shallwe === true ? "1" : "0") . |
|
| 317 | - ( $localpart !== NULL ? ", checkuser_value = '$localpart' " : "") . |
|
| 316 | + $this->databaseHandle->exec("UPDATE profile SET checkuser_outer = ".($shallwe === true ? "1" : "0"). |
|
| 317 | + ($localpart !== NULL ? ", checkuser_value = '$localpart' " : ""). |
|
| 318 | 318 | " WHERE profile_id = $this->identifier"); |
| 319 | 319 | } |
| 320 | 320 | |
@@ -327,8 +327,8 @@ discard block |
||
| 327 | 327 | */ |
| 328 | 328 | public function setInputVerificationPreference($verify, $hint) |
| 329 | 329 | { |
| 330 | - $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = " . ($verify === true ? "1" : "0") . |
|
| 331 | - ", hint_userinput_suffix = " . ($hint === true ? "1" : "0") . |
|
| 330 | + $this->databaseHandle->exec("UPDATE profile SET verify_userinput_suffix = ".($verify === true ? "1" : "0"). |
|
| 331 | + ", hint_userinput_suffix = ".($hint === true ? "1" : "0"). |
|
| 332 | 332 | " WHERE profile_id = $this->identifier"); |
| 333 | 333 | } |
| 334 | 334 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | // realm is automatically calculated, then stored in DB |
| 98 | 98 | |
| 99 | - $this->realm = "opaquehash@$myInst->identifier-$this->identifier." . strtolower($myInst->federation) . \config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
| 99 | + $this->realm = "opaquehash@$myInst->identifier-$this->identifier.".strtolower($myInst->federation).\config\ConfAssistant::SILVERBULLET['realm_suffix']; |
|
| 100 | 100 | $localValueIfAny = ""; |
| 101 | 101 | |
| 102 | 102 | // but there's some common internal attributes populated directly |
@@ -113,11 +113,11 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | // and we need to populate eap:server_name and eap:ca_file with the NRO-specific EAP information |
| 115 | 115 | $silverbulletAttributes = [ |
| 116 | - "eap:server_name" => "auth." . strtolower($myFed->tld) . \config\ConfAssistant::SILVERBULLET['server_suffix'], |
|
| 116 | + "eap:server_name" => "auth.".strtolower($myFed->tld).\config\ConfAssistant::SILVERBULLET['server_suffix'], |
|
| 117 | 117 | ]; |
| 118 | 118 | $temp = array_merge($this->addInternalAttributes($internalAttributes), $this->addInternalAttributes($silverbulletAttributes)); |
| 119 | 119 | $x509 = new \core\common\X509(); |
| 120 | - $caHandle = fopen(dirname(__FILE__) . "/../config/SilverbulletServerCerts/" . strtoupper($myFed->tld) . "/root.pem", "r"); |
|
| 120 | + $caHandle = fopen(dirname(__FILE__)."/../config/SilverbulletServerCerts/".strtoupper($myFed->tld)."/root.pem", "r"); |
|
| 121 | 121 | if ($caHandle !== FALSE) { |
| 122 | 122 | $cAFile = fread($caHandle, 16000000); |
| 123 | 123 | foreach ($x509->splitCertificate($cAFile) as $oneCa) { |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | if (empty($certNames)) { |
| 274 | 274 | return []; |
| 275 | 275 | } |
| 276 | - $namesCondensed = "'" . implode("' OR username = '", $certNames) . "'"; |
|
| 276 | + $namesCondensed = "'".implode("' OR username = '", $certNames)."'"; |
|
| 277 | 277 | $serverHandles = DBConnection::handle("RADIUS"); |
| 278 | 278 | $returnarray = []; |
| 279 | 279 | foreach ($serverHandles as $oneDbServer) { |
@@ -132,20 +132,20 @@ discard block |
||
| 132 | 132 | if ($device == "TOTAL") { |
| 133 | 133 | continue; |
| 134 | 134 | } |
| 135 | - $retstring .= "<tr><td>$device</td><td>" . $numbers['ADMIN'] . "</td><td>" . $numbers['SILVERBULLET'] . "</td><td>" . $numbers['USER'] . "</td></tr>"; |
|
| 135 | + $retstring .= "<tr><td>$device</td><td>".$numbers['ADMIN']."</td><td>".$numbers['SILVERBULLET']."</td><td>".$numbers['USER']."</td></tr>"; |
|
| 136 | 136 | } |
| 137 | - $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>" . $data['TOTAL']['ADMIN'] . "</strong></td><td><strong>" . $data['TOTAL']['SILVERBULLET'] . "</strong></td><td><strong>" . $data['TOTAL']['USER'] . "</strong></td></tr>"; |
|
| 137 | + $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>".$data['TOTAL']['ADMIN']."</strong></td><td><strong>".$data['TOTAL']['SILVERBULLET']."</strong></td><td><strong>".$data['TOTAL']['USER']."</strong></td></tr>"; |
|
| 138 | 138 | break; |
| 139 | 139 | case "XML": |
| 140 | 140 | // the calls to date() operate on current date, so there is no chance for a FALSE to be returned. Silencing scrutinizer. |
| 141 | - $retstring .= "<federation id='$this->tld' ts='" . /** @scrutinizer ignore-type */ date("Y-m-d") . "T" . /** @scrutinizer ignore-type */ date("H:i:s") . "'>\n"; |
|
| 141 | + $retstring .= "<federation id='$this->tld' ts='"./** @scrutinizer ignore-type */ date("Y-m-d")."T"./** @scrutinizer ignore-type */ date("H:i:s")."'>\n"; |
|
| 142 | 142 | foreach ($data as $device => $numbers) { |
| 143 | 143 | if ($device == "TOTAL") { |
| 144 | 144 | continue; |
| 145 | 145 | } |
| 146 | - $retstring .= " <device name='" . $device . "'>\n <downloads group='admin'>" . $numbers['ADMIN'] . "</downloads>\n <downloads group='managed_idp'>" . $numbers['SILVERBULLET'] . "</downloads>\n <downloads group='user'>" . $numbers['USER'] . "</downloads>\n </device>"; |
|
| 146 | + $retstring .= " <device name='".$device."'>\n <downloads group='admin'>".$numbers['ADMIN']."</downloads>\n <downloads group='managed_idp'>".$numbers['SILVERBULLET']."</downloads>\n <downloads group='user'>".$numbers['USER']."</downloads>\n </device>"; |
|
| 147 | 147 | } |
| 148 | - $retstring .= "<total>\n <downloads group='admin'>" . $data['TOTAL']['ADMIN'] . "</downloads>\n <downloads group='managed_idp'>" . $data['TOTAL']['SILVERBULLET'] . "</downloads>\n <downloads group='user'>" . $data['TOTAL']['USER'] . "</downloads>\n</total>\n"; |
|
| 148 | + $retstring .= "<total>\n <downloads group='admin'>".$data['TOTAL']['ADMIN']."</downloads>\n <downloads group='managed_idp'>".$data['TOTAL']['SILVERBULLET']."</downloads>\n <downloads group='user'>".$data['TOTAL']['USER']."</downloads>\n</total>\n"; |
|
| 149 | 149 | $retstring .= "</federation>"; |
| 150 | 150 | break; |
| 151 | 151 | case "array": |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | $identifier = $this->databaseHandle->lastID(); |
| 238 | 238 | |
| 239 | 239 | if ($identifier == 0 || !$this->loggerInstance->writeAudit($ownerId, "NEW", "Organisation $identifier")) { |
| 240 | - $text = "<p>Could not create a new " . \config\ConfAssistant::CONSORTIUM['nomenclature_inst'] . "!</p>"; |
|
| 240 | + $text = "<p>Could not create a new ".\config\ConfAssistant::CONSORTIUM['nomenclature_inst']."!</p>"; |
|
| 241 | 241 | echo $text; |
| 242 | 242 | throw new Exception($text); |
| 243 | 243 | } |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | return; // no update to fetch |
| 380 | 380 | } |
| 381 | 381 | $certDetails = openssl_x509_parse($entryInQuestion['CERT']); |
| 382 | - $expiry = "20" . $certDetails['validTo'][0] . $certDetails['validTo'][1] . "-" . $certDetails['validTo'][2] . $certDetails['validTo'][3] . "-" . $certDetails['validTo'][4] . $certDetails['validTo'][5]; |
|
| 382 | + $expiry = "20".$certDetails['validTo'][0].$certDetails['validTo'][1]."-".$certDetails['validTo'][2].$certDetails['validTo'][3]."-".$certDetails['validTo'][4].$certDetails['validTo'][5]; |
|
| 383 | 383 | openssl_x509_export($entryInQuestion['CERT'], $pem); |
| 384 | 384 | $updateQuery = "UPDATE federation_servercerts SET status = 'ISSUED', certificate = ?, expiry = ? WHERE ca_name = 'eduPKI' AND request_serial = ?"; |
| 385 | 385 | $this->databaseHandle->exec($updateQuery, "ssi", $pem, $expiry, $reqSerial); |