@@ -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,21 +219,21 @@ 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 ($this->attributes['internal:hint_userinput_suffix'][0] != 0) { |
226 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
226 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
227 | 227 | \core\common\Entity::outOfThePotatoes(); |
228 | 228 | return $retval; |
229 | 229 | } else { |
230 | 230 | if (strlen($this->attributes['internal:realm'][0]) > 0) { |
231 | 231 | /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username! |
232 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
232 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST contain an '@' and end with ...%s !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
233 | 233 | \core\common\Entity::outOfThePotatoes(); |
234 | 234 | return $retval; |
235 | 235 | } |
236 | - $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; |
|
236 | + $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; |
|
237 | 237 | \core\common\Entity::outOfThePotatoes(); |
238 | 238 | return $retval; |
239 | 239 | } |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | // also escape htmlspecialchars |
258 | 258 | // not all names and profiles have a name, so be prepared |
259 | 259 | |
260 | - $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE)); |
|
260 | + $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE)); |
|
261 | 261 | |
262 | 262 | $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation"); |
263 | 263 | $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile"); |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | |
300 | 300 | file_put_contents('installer_profile', $outputXml); |
301 | 301 | |
302 | - $fileName = $this->installerBasename . '.mobileconfig'; |
|
302 | + $fileName = $this->installerBasename.'.mobileconfig'; |
|
303 | 303 | |
304 | 304 | if (!$this->sign) { |
305 | 305 | rename("installer_profile", $fileName); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | return $fileName; |
308 | 308 | } |
309 | 309 | // still here? Then we are signing. |
310 | - $signing = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
310 | + $signing = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
311 | 311 | if ($signing === FALSE) { |
312 | 312 | $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n"); |
313 | 313 | } |
@@ -326,19 +326,19 @@ discard block |
||
326 | 326 | \core\common\Entity::intoThePotatoes(); |
327 | 327 | $ssidCount = count($this->attributes['internal:SSID']); |
328 | 328 | $certCount = count($this->attributes['internal:CAs'][0]); |
329 | - $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>"; |
|
329 | + $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>"; |
|
330 | 330 | $out .= "<p>"; |
331 | 331 | $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:"); |
332 | 332 | $out .= "<ul>"; |
333 | - $out .= "<li>" . _("to install the profile") . "</li>"; |
|
334 | - $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
333 | + $out .= "<li>"._("to install the profile")."</li>"; |
|
334 | + $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
335 | 335 | if ($certCount > 1) { |
336 | - $out .= " " . sprintf(_("(%d times)"), $certCount); |
|
336 | + $out .= " ".sprintf(_("(%d times)"), $certCount); |
|
337 | 337 | } |
338 | 338 | $out .= "</li>"; |
339 | - $out .= "<li>" . _("to enter the username and password you have been given by your organisation"); |
|
339 | + $out .= "<li>"._("to enter the username and password you have been given by your organisation"); |
|
340 | 340 | if ($ssidCount > 1) { |
341 | - $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
341 | + $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
342 | 342 | } |
343 | 343 | $out .= "</li>"; |
344 | 344 | $out .= "</ul>"; |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | <key>ServiceProviderRoamingEnabled</key> |
379 | 379 | <true/> |
380 | 380 | <key>DisplayedOperatorName</key> |
381 | - <string>" . $oiName . "</string>"; |
|
381 | + <string>" . $oiName."</string>"; |
|
382 | 382 | // if we don't know the realm, omit the entire DomainName key |
383 | 383 | if (isset($this->attributes['internal:realm'])) { |
384 | 384 | $retval .= "<key>DomainName</key> |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | <array>"; |
392 | 392 | |
393 | 393 | foreach ($consortiumOi as $oneCons) { |
394 | - $retval .= "<string>" . strtoupper($oneCons) . "</string>"; |
|
394 | + $retval .= "<string>".strtoupper($oneCons)."</string>"; |
|
395 | 395 | } |
396 | 396 | |
397 | 397 | $retval .= "</array>"; |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | <dict> |
430 | 430 | <key>AcceptEAPTypes</key> |
431 | 431 | <array> |
432 | - <integer>" . $eapType['OUTER'] . "</integer> |
|
432 | + <integer>" . $eapType['OUTER']."</integer> |
|
433 | 433 | </array> |
434 | 434 | <key>EAPFASTProvisionPAC</key> |
435 | 435 | <true /> |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | "; |
443 | 443 | if ($realm !== NULL) { |
444 | 444 | $retval .= "<key>OuterIdentity</key> |
445 | - <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string> |
|
445 | + <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string> |
|
446 | 446 | "; |
447 | 447 | } |
448 | 448 | $retval .= "<key>PayloadCertificateAnchorUUID</key> |
@@ -466,11 +466,11 @@ discard block |
||
466 | 466 | $retval .= " |
467 | 467 | </array>"; |
468 | 468 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
469 | - $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>"; |
|
469 | + $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>"; |
|
470 | 470 | } |
471 | 471 | $retval .= " |
472 | 472 | <key>TTLSInnerAuthentication</key> |
473 | - <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2") . "</string> |
|
473 | + <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2")."</string> |
|
474 | 474 | </dict>"; |
475 | 475 | return $retval; |
476 | 476 | } |
@@ -490,9 +490,9 @@ discard block |
||
490 | 490 | // characters are still reversed, invert on use! |
491 | 491 | $buffer .= "<string>Manual</string> |
492 | 492 | <key>ProxyServer</key> |
493 | - <string>" . strrev($serverAndPort[1]) . "</string> |
|
493 | + <string>" . strrev($serverAndPort[1])."</string> |
|
494 | 494 | <key>ProxyServerPort</key> |
495 | - <integer>" . strrev($serverAndPort[0]) . "</integer> |
|
495 | + <integer>" . strrev($serverAndPort[0])."</integer> |
|
496 | 496 | <key>ProxyPACFallbackAllowed</key> |
497 | 497 | <false/>"; |
498 | 498 | } else { |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | throw new Exception("SSID must be a string!"); |
522 | 522 | } |
523 | 523 | $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8'); |
524 | - $payloadIdentifier = "wifi." . $this->serial; |
|
524 | + $payloadIdentifier = "wifi.".$this->serial; |
|
525 | 525 | $payloadShortName = sprintf(_("SSID %s"), $escapedSSID); |
526 | 526 | $payloadName = sprintf(_("%s configuration for network name %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $escapedSSID); |
527 | 527 | $encryptionTypeString = "WPA"; |
@@ -548,10 +548,10 @@ discard block |
||
548 | 548 | if (!is_array($toBeConfigured)) { |
549 | 549 | throw new Exception("ConsortiumOI must be an array!"); |
550 | 550 | } |
551 | - $payloadIdentifier = "hs20.".implode('-',$toBeConfigured); |
|
551 | + $payloadIdentifier = "hs20.".implode('-', $toBeConfigured); |
|
552 | 552 | $knownOiName = array_search($toBeConfigured, \config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']); |
553 | 553 | if ($knownOiName === FALSE) { // a custom RCOI as set by the IdP admin; do not use the term "eduroam" in that one! |
554 | - $knownOiName = $this->instName . " "._("Roaming Partner"); |
|
554 | + $knownOiName = $this->instName." "._("Roaming Partner"); |
|
555 | 555 | } |
556 | 556 | $payloadShortName = $knownOiName; |
557 | 557 | $payloadName = _("Passpoint roaming configuration ($knownOiName)"); |
@@ -573,11 +573,11 @@ discard block |
||
573 | 573 | <key>PayloadDisplayName</key> |
574 | 574 | <string>$payloadShortName</string> |
575 | 575 | <key>PayloadIdentifier</key> |
576 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
576 | + <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
577 | 577 | <key>PayloadOrganization</key> |
578 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
578 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
579 | 579 | <key>PayloadType</key> |
580 | - <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>"; |
|
580 | + <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>"; |
|
581 | 581 | $retval .= $this->proxySettings(); |
582 | 582 | $retval .= $setupModesString; |
583 | 583 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | } |
590 | 590 | $retval .= " |
591 | 591 | <key>PayloadUUID</key> |
592 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
592 | + <string>" . \core\common\Entity::uuid()."</string> |
|
593 | 593 | <key>PayloadVersion</key> |
594 | 594 | <integer>1</integer> |
595 | 595 | $wifiNetworkIdentification</dict>"; |
@@ -619,15 +619,15 @@ discard block |
||
619 | 619 | <key>IsHotspot</key> |
620 | 620 | <false/> |
621 | 621 | <key>PayloadDescription</key> |
622 | - <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string> |
|
622 | + <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string> |
|
623 | 623 | <key>PayloadDisplayName</key> |
624 | - <string>" . _("Disabled WiFi network") . "</string> |
|
624 | + <string>" . _("Disabled WiFi network")."</string> |
|
625 | 625 | <key>PayloadIdentifier</key> |
626 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
626 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
627 | 627 | <key>PayloadType</key> |
628 | 628 | <string>com.apple.wifi.managed</string> |
629 | 629 | <key>PayloadUUID</key> |
630 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
630 | + <string>".\core\common\Entity::uuid()."</string> |
|
631 | 631 | <key>PayloadVersion</key> |
632 | 632 | <real>1</real>"; |
633 | 633 | $retval .= $this->proxySettings(); |
@@ -704,12 +704,12 @@ discard block |
||
704 | 704 | $mimeBlob = base64_encode($binaryBlob); |
705 | 705 | $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n"); |
706 | 706 | $payloadUUID = \core\common\Entity::uuid('', $mimeBlob); |
707 | - $retArray = ["block" => "<dict>" . |
|
707 | + $retArray = ["block" => "<dict>". |
|
708 | 708 | // we don't include the import password. It's displayed on screen, and should be input by the user. |
709 | 709 | // <key>Password</key> |
710 | 710 | // <string>" . $this->clientCert['password'] . "</string> |
711 | 711 | "<key>PayloadCertificateFileName</key> |
712 | - <string>" . $this->massagedConsortium . ".pfx</string> |
|
712 | + <string>" . $this->massagedConsortium.".pfx</string> |
|
713 | 713 | <key>PayloadContent</key> |
714 | 714 | <data> |
715 | 715 | $mimeFormatted |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | <key>PayloadDescription</key> |
718 | 718 | <string>MIME Base-64 encoded PKCS#12 Client Certificate</string> |
719 | 719 | <key>PayloadDisplayName</key> |
720 | - <string>" . _("User certificate") . "</string> |
|
720 | + <string>"._("User certificate")."</string> |
|
721 | 721 | <key>PayloadIdentifier</key> |
722 | 722 | <string>com.apple.security.pkcs12.$payloadUUID</string> |
723 | 723 | <key>PayloadType</key> |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | <key>PayloadVersion</key> |
728 | 728 | <integer>1</integer> |
729 | 729 | </dict>", |
730 | - "UUID" => $payloadUUID,]; |
|
730 | + "UUID" => $payloadUUID, ]; |
|
731 | 731 | \core\common\Entity::outOfThePotatoes(); |
732 | 732 | return $retArray; |
733 | 733 | } |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | } |
746 | 746 | $expiryTime = new \DateTime($this->clientCert['certObject']->expiry); |
747 | 747 | return "<key>RemovalDate</key> |
748 | - <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>"; |
|
748 | + <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>"; |
|
749 | 749 | } |
750 | 750 | |
751 | 751 | /** |
@@ -767,27 +767,27 @@ discard block |
||
767 | 767 | $stream = " |
768 | 768 | <dict> |
769 | 769 | <key>PayloadCertificateFileName</key> |
770 | - <string>" . $ca['uuid'] . ".der</string> |
|
770 | + <string>" . $ca['uuid'].".der</string> |
|
771 | 771 | <key>PayloadContent</key> |
772 | 772 | <data> |
773 | -" . $trimmedPem . "</data> |
|
773 | +" . $trimmedPem."</data> |
|
774 | 774 | <key>PayloadDescription</key> |
775 | - <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
775 | + <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string> |
|
776 | 776 | <key>PayloadDisplayName</key> |
777 | 777 | <string>" . |
778 | 778 | /// example: "Identity Provider CA #1 (Root)" |
779 | - sprintf(_("%s CA #%d (%s)" ), |
|
779 | + sprintf(_("%s CA #%d (%s)"), |
|
780 | 780 | \core\common\Entity::$nomenclature_inst, |
781 | - count($this->CAsAccountedFor)+1, |
|
782 | - ($ca['root'] ? _("Root") : _("Intermediate"))) . |
|
781 | + count($this->CAsAccountedFor) + 1, |
|
782 | + ($ca['root'] ? _("Root") : _("Intermediate"))). |
|
783 | 783 | "</string> |
784 | 784 | <key>PayloadIdentifier</key> |
785 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
785 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
786 | 786 | <key>PayloadOrganization</key> |
787 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
787 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
788 | 788 | <key>PayloadType</key> |
789 | 789 | <string>com.apple.security.root</string> |
790 | - <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string> |
|
790 | + <key>PayloadUUID</key><string>" . $ca['uuid']."</string> |
|
791 | 791 | <key>PayloadVersion</key> |
792 | 792 | <integer>1</integer> |
793 | 793 | </dict>"; |