@@ -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>"; |