@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $cryptoJson = openssl_encrypt($clearJson, 'AES-256-CBC', $encryptionKey, OPENSSL_RAW_DATA, $initVector); |
122 | 122 | $hmac = hash_hmac("sha1", $cryptoJson, $encryptionKey, TRUE); |
123 | 123 | |
124 | - $this->loggerInstance->debug(4, "Clear = $clearJson\nSalt = $salt\nPW = " . $password . "\nb(IV) = " . base64_encode($initVector) . "\nb(Cipher) = " . base64_encode($cryptoJson) . "\nb(HMAC) = " . base64_encode($hmac)); |
|
124 | + $this->loggerInstance->debug(4, "Clear = $clearJson\nSalt = $salt\nPW = ".$password."\nb(IV) = ".base64_encode($initVector)."\nb(Cipher) = ".base64_encode($cryptoJson)."\nb(HMAC) = ".base64_encode($hmac)); |
|
125 | 125 | |
126 | 126 | // now, generate the container that holds all the crypto data |
127 | 127 | $finalArray = [ |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | private function wiredBlock($eapdetails) |
196 | 196 | { |
197 | 197 | return [ |
198 | - "GUID" => \core\common\Entity::uuid('', "wired-dot1x-ethernet") . "}", |
|
198 | + "GUID" => \core\common\Entity::uuid('', "wired-dot1x-ethernet")."}", |
|
199 | 199 | "Name" => "eduroam configuration (wired network)", |
200 | 200 | "Remove" => false, |
201 | 201 | "Type" => "Ethernet", |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | // if silverbullet, we deliver the client cert inline |
237 | 237 | |
238 | 238 | if ($selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
239 | - $eaparray['ClientCertRef'] = "[" . $this->clientCert['GUID'] . "]"; |
|
239 | + $eaparray['ClientCertRef'] = "[".$this->clientCert['GUID']."]"; |
|
240 | 240 | $eaparray['ClientCertType'] = "Ref"; |
241 | 241 | } |
242 | 242 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $jsonArray = ["Type" => "UnencryptedConfiguration"]; |
272 | 272 | |
273 | 273 | foreach ($this->attributes['internal:CAs'][0] as $ca) { |
274 | - $caRefs[] = "{" . $ca['uuid'] . "}"; |
|
274 | + $caRefs[] = "{".$ca['uuid']."}"; |
|
275 | 275 | } |
276 | 276 | // define CA certificates |
277 | 277 | foreach ($this->attributes['internal:CAs'][0] as $ca) { |
@@ -281,15 +281,15 @@ discard block |
||
281 | 281 | if ($caSanitized1 === FALSE) { |
282 | 282 | throw new Exception("Error cropping PEM data at its BEGIN marker."); |
283 | 283 | } |
284 | - $this->loggerInstance->debug(4, $caSanitized1 . "\n"); |
|
284 | + $this->loggerInstance->debug(4, $caSanitized1."\n"); |
|
285 | 285 | // remove \n |
286 | 286 | $caSanitized = str_replace("\n", "", $caSanitized1); |
287 | - $jsonArray["Certificates"][] = ["GUID" => "{" . $ca['uuid'] . "}", "Remove" => false, "Type" => "Authority", "X509" => $caSanitized]; |
|
288 | - $this->loggerInstance->debug(3, $caSanitized . "\n"); |
|
287 | + $jsonArray["Certificates"][] = ["GUID" => "{".$ca['uuid']."}", "Remove" => false, "Type" => "Authority", "X509" => $caSanitized]; |
|
288 | + $this->loggerInstance->debug(3, $caSanitized."\n"); |
|
289 | 289 | } |
290 | 290 | // if we are doing silverbullet, include the unencrypted(!) P12 as a client certificate |
291 | 291 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_SILVERBULLET) { |
292 | - $jsonArray["Certificates"][] = ["GUID" => "[" . $this->clientCert['GUID'] . "]", "PKCS12" => base64_encode($this->clientCert['certdataclear']), "Remove" => false, "Type" => "Client"]; |
|
292 | + $jsonArray["Certificates"][] = ["GUID" => "[".$this->clientCert['GUID']."]", "PKCS12" => base64_encode($this->clientCert['certdataclear']), "Remove" => false, "Type" => "Client"]; |
|
293 | 293 | } |
294 | 294 | $eaparray = $this->eapBlock($caRefs); |
295 | 295 | // define Wi-Fi networks |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | |
313 | 313 | file_put_contents('installer_profile', $finalJson); |
314 | 314 | |
315 | - $fileName = $this->installerBasename . '.onc'; |
|
315 | + $fileName = $this->installerBasename.'.onc'; |
|
316 | 316 | |
317 | 317 | if (!$this->sign) { |
318 | 318 | rename("installer_profile", $fileName); |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | // have the notion of signing |
324 | 324 | // but if they ever change their mind, we are prepared |
325 | 325 | |
326 | - $outputFromSigning = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
326 | + $outputFromSigning = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
327 | 327 | if ($outputFromSigning === FALSE) { |
328 | 328 | $this->loggerInstance->debug(2, "Signing the ONC installer $fileName FAILED!\n"); |
329 | 329 | } |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | if ( |
523 | 523 | get_class($this) == "devices\apple_mobileconfig\DeviceMobileconfigIos12plus" || |
524 | 524 | get_class($this) == "devices\apple_mobileconfig\DeviceMobileconfigOsX" |
525 | - ) { |
|
525 | + ) { |
|
526 | 526 | return "WPA2"; |
527 | 527 | } else { |
528 | 528 | return "WPA"; |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | \core\common\Entity::$nomenclature_inst, |
810 | 810 | count($this->CAsAccountedFor)+1, |
811 | 811 | ($ca['root'] ? _("Root") : _("Intermediate"))) . |
812 | - "</string> |
|
812 | + "</string> |
|
813 | 813 | <key>PayloadIdentifier</key> |
814 | 814 | <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
815 | 815 | <key>PayloadOrganization</key> |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | \core\common\Entity::intoThePotatoes(); |
146 | 146 | // that's what all variants support. Sub-classes can change it. |
147 | 147 | $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_PEAP_MSCHAP2, \core\common\EAP::EAPTYPE_TTLS_PAP, \core\common\EAP::EAPTYPE_TTLS_MSCHAP2, \core\common\EAP::EAPTYPE_SILVERBULLET]); |
148 | - foreach(\core\common\EAP::listKnownEAPTypes() as $eapType) { |
|
148 | + foreach (\core\common\EAP::listKnownEAPTypes() as $eapType) { |
|
149 | 149 | if ($eapType->isPasswordRequired() || $eapType->isPasswordOptional()) { |
150 | 150 | $this->specialities['internal:verify_userinput_suffix'][serialize($eapType->getArrayRep())] = _("It is not possible to actively verify the user input for suffix match; but if there is no 'Terms of Use' configured, the installer will display a corresponding hint to the user instead."); |
151 | 151 | $this->specialities['media:openroaming'][serialize($eapType->getArrayRep())] = _("OpenRoaming is not provisioned due to severe UI limitations during install time."); |
@@ -185,15 +185,15 @@ discard block |
||
185 | 185 | <key>PayloadDescription</key> |
186 | 186 | <string>$tagline</string> |
187 | 187 | <key>PayloadDisplayName</key> |
188 | - <string>" . \config\ConfAssistant::CONSORTIUM['display_name'] . "</string> |
|
188 | + <string>".\config\ConfAssistant::CONSORTIUM['display_name']."</string> |
|
189 | 189 | <key>PayloadIdentifier</key> |
190 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
190 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
|
191 | 191 | <key>PayloadOrganization</key> |
192 | - <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> |
|
192 | + <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> |
|
193 | 193 | <key>PayloadType</key> |
194 | 194 | <string>Configuration</string> |
195 | 195 | <key>PayloadUUID</key> |
196 | - <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX . $this->massagedConsortium . $this->massagedCountry . $this->massagedInst . $this->massagedProfile) . "</string> |
|
196 | + <string>" . \core\common\Entity::uuid('', self::IPHONE_PAYLOAD_PREFIX.$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile)."</string> |
|
197 | 197 | <key>PayloadVersion</key> |
198 | 198 | <integer>1</integer>"; |
199 | 199 | \core\common\Entity::outOfThePotatoes(); |
@@ -225,21 +225,21 @@ discard block |
||
225 | 225 | { |
226 | 226 | \core\common\Entity::intoThePotatoes(); |
227 | 227 | if (isset($this->attributes['support:info_file'])) { |
228 | - 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; |
|
228 | + 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; |
|
229 | 229 | } |
230 | 230 | if ($this->attributes['internal:verify_userinput_suffix'][0] != 0) { |
231 | 231 | if ($this->attributes['internal:hint_userinput_suffix'][0] != 0) { |
232 | - $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE . sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]) . MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
232 | + $retval = MobileconfigSuperclass::BUFFER_CONSENT_PRE.sprintf(_("Important Notice: your username MUST end exactly with '...@%s' !"), $this->attributes['internal:realm'][0]).MobileconfigSuperclass::BUFFER_CONSENT_POST; |
|
233 | 233 | \core\common\Entity::outOfThePotatoes(); |
234 | 234 | return $retval; |
235 | 235 | } else { |
236 | 236 | if (strlen($this->attributes['internal:realm'][0]) > 0) { |
237 | 237 | /// note space between variable and exclamation mark - makes sure users don't mistakenly think the exclamation mark is part of the required username! |
238 | - $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; |
|
238 | + $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; |
|
239 | 239 | \core\common\Entity::outOfThePotatoes(); |
240 | 240 | return $retval; |
241 | 241 | } |
242 | - $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; |
|
242 | + $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; |
|
243 | 243 | \core\common\Entity::outOfThePotatoes(); |
244 | 244 | return $retval; |
245 | 245 | } |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | // also escape htmlspecialchars |
264 | 264 | // not all names and profiles have a name, so be prepared |
265 | 265 | |
266 | - $this->loggerInstance->debug(5, "List of available attributes: " . var_export($this->attributes, TRUE)); |
|
266 | + $this->loggerInstance->debug(5, "List of available attributes: ".var_export($this->attributes, TRUE)); |
|
267 | 267 | |
268 | 268 | $this->instName = $this->attributes['general:instname'][0] ?? _("Unnamed Organisation"); |
269 | 269 | $this->profileName = $this->attributes['profile:name'][0] ?? _("Unnamed Profile"); |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | |
306 | 306 | file_put_contents('installer_profile', $outputXml); |
307 | 307 | |
308 | - $fileName = $this->installerBasename . '.mobileconfig'; |
|
308 | + $fileName = $this->installerBasename.'.mobileconfig'; |
|
309 | 309 | |
310 | 310 | if (!$this->sign) { |
311 | 311 | rename("installer_profile", $fileName); |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | return $fileName; |
314 | 314 | } |
315 | 315 | // still here? Then we are signing. |
316 | - $signing = system($this->sign . " installer_profile '$fileName' > /dev/null"); |
|
316 | + $signing = system($this->sign." installer_profile '$fileName' > /dev/null"); |
|
317 | 317 | if ($signing === FALSE) { |
318 | 318 | $this->loggerInstance->debug(2, "Signing the mobileconfig installer $fileName FAILED!\n"); |
319 | 319 | } |
@@ -332,19 +332,19 @@ discard block |
||
332 | 332 | \core\common\Entity::intoThePotatoes(); |
333 | 333 | $ssidCount = count($this->attributes['internal:SSID']); |
334 | 334 | $certCount = count($this->attributes['internal:CAs'][0]); |
335 | - $out = "<p>" . _("For best results, please use the built-in browser (Safari) to open the configuration file.") . "</p>"; |
|
335 | + $out = "<p>"._("For best results, please use the built-in browser (Safari) to open the configuration file.")."</p>"; |
|
336 | 336 | $out .= "<p>"; |
337 | 337 | $out .= _("The profile will install itself after you click (or tap) the button. You will be asked for confirmation/input at several points:"); |
338 | 338 | $out .= "<ul>"; |
339 | - $out .= "<li>" . _("to install the profile") . "</li>"; |
|
340 | - $out .= "<li>" . ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
339 | + $out .= "<li>"._("to install the profile")."</li>"; |
|
340 | + $out .= "<li>".ngettext("to accept the server certificate authority", "to accept the server certificate authorities", $certCount); |
|
341 | 341 | if ($certCount > 1) { |
342 | - $out .= " " . sprintf(_("(%d times)"), $certCount); |
|
342 | + $out .= " ".sprintf(_("(%d times)"), $certCount); |
|
343 | 343 | } |
344 | 344 | $out .= "</li>"; |
345 | - $out .= "<li>" . _("to enter the username and password you have been given by your organisation"); |
|
345 | + $out .= "<li>"._("to enter the username and password you have been given by your organisation"); |
|
346 | 346 | if ($ssidCount > 1) { |
347 | - $out .= " " . sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
347 | + $out .= " ".sprintf(_("(%d times each, because %s is installed for %d SSIDs)"), $ssidCount, \config\ConfAssistant::CONSORTIUM['display_name'], $ssidCount); |
|
348 | 348 | } |
349 | 349 | $out .= "</li>"; |
350 | 350 | $out .= "</ul>"; |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | <key>ServiceProviderRoamingEnabled</key> |
385 | 385 | <true/> |
386 | 386 | <key>DisplayedOperatorName</key> |
387 | - <string>" . $oiName . "</string>"; |
|
387 | + <string>" . $oiName."</string>"; |
|
388 | 388 | // if we don't know the realm, omit the entire DomainName key |
389 | 389 | if (isset($this->attributes['internal:realm'])) { |
390 | 390 | $retval .= "<key>DomainName</key> |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | <array>"; |
398 | 398 | |
399 | 399 | foreach ($consortiumOi as $oneCons) { |
400 | - $retval .= "<string>" . strtoupper($oneCons) . "</string>"; |
|
400 | + $retval .= "<string>".strtoupper($oneCons)."</string>"; |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | $retval .= "</array>"; |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | <dict> |
436 | 436 | <key>AcceptEAPTypes</key> |
437 | 437 | <array> |
438 | - <integer>" . $eapType['OUTER'] . "</integer> |
|
438 | + <integer>" . $eapType['OUTER']."</integer> |
|
439 | 439 | </array> |
440 | 440 | <key>EAPFASTProvisionPAC</key> |
441 | 441 | <true /> |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | "; |
449 | 449 | if ($realm !== NULL) { |
450 | 450 | $retval .= "<key>OuterIdentity</key> |
451 | - <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8') . "</string> |
|
451 | + <string>" . htmlspecialchars($realm, ENT_XML1, 'UTF-8')."</string> |
|
452 | 452 | "; |
453 | 453 | } |
454 | 454 | $retval .= "<key>PayloadCertificateAnchorUUID</key> |
@@ -472,11 +472,11 @@ discard block |
||
472 | 472 | $retval .= " |
473 | 473 | </array>"; |
474 | 474 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
475 | - $retval .= "<key>UserName</key><string>" . $this->clientCert["certObject"]->username . "</string>"; |
|
475 | + $retval .= "<key>UserName</key><string>".$this->clientCert["certObject"]->username."</string>"; |
|
476 | 476 | } |
477 | 477 | $retval .= " |
478 | 478 | <key>TTLSInnerAuthentication</key> |
479 | - <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2") . "</string> |
|
479 | + <string>" . ($eapType['INNER'] == \core\common\EAP::NE_PAP ? "PAP" : "MSCHAPv2")."</string> |
|
480 | 480 | </dict>"; |
481 | 481 | return $retval; |
482 | 482 | } |
@@ -496,9 +496,9 @@ discard block |
||
496 | 496 | // characters are still reversed, invert on use! |
497 | 497 | $buffer .= "<string>Manual</string> |
498 | 498 | <key>ProxyServer</key> |
499 | - <string>" . strrev($serverAndPort[1]) . "</string> |
|
499 | + <string>" . strrev($serverAndPort[1])."</string> |
|
500 | 500 | <key>ProxyServerPort</key> |
501 | - <integer>" . strrev($serverAndPort[0]) . "</integer> |
|
501 | + <integer>" . strrev($serverAndPort[0])."</integer> |
|
502 | 502 | <key>ProxyPACFallbackAllowed</key> |
503 | 503 | <false/>"; |
504 | 504 | } else { |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | throw new Exception("SSID must be a string!"); |
549 | 549 | } |
550 | 550 | $escapedSSID = htmlspecialchars($toBeConfigured, ENT_XML1, 'UTF-8'); |
551 | - $payloadIdentifier = "wifi." . $this->serial; |
|
551 | + $payloadIdentifier = "wifi.".$this->serial; |
|
552 | 552 | $payloadShortName = sprintf(_("%s - SSID %s"), $prettyName, $escapedSSID); |
553 | 553 | $payloadName = sprintf(_("%s configuration for network name %s"), $prettyName, $escapedSSID); |
554 | 554 | $encryptionTypeString = $this->encryptionString(); |
@@ -578,9 +578,9 @@ discard block |
||
578 | 578 | if (count($toBeConfigured) == 0) { |
579 | 579 | return ""; |
580 | 580 | } |
581 | - $payloadIdentifier = "hs20.".implode('-',$toBeConfigured); |
|
581 | + $payloadIdentifier = "hs20.".implode('-', $toBeConfigured); |
|
582 | 582 | $payloadShortName = sprintf(_("%s - RCOI"), $prettyName); |
583 | - $payloadName = sprintf(_("%s configuration (Passpoint RCOI)"),$prettyName); |
|
583 | + $payloadName = sprintf(_("%s configuration (Passpoint RCOI)"), $prettyName); |
|
584 | 584 | $encryptionTypeString = $this->encryptionString(); |
585 | 585 | $setupModesString = ""; |
586 | 586 | $wifiNetworkIdentification = $this->passPointBlock($toBeConfigured, $prettyName); |
@@ -599,11 +599,11 @@ discard block |
||
599 | 599 | <key>PayloadDisplayName</key> |
600 | 600 | <string>$payloadShortName</string> |
601 | 601 | <key>PayloadIdentifier</key> |
602 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
602 | + <string>".self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.$payloadIdentifier</string> |
|
603 | 603 | <key>PayloadOrganization</key> |
604 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
604 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
605 | 605 | <key>PayloadType</key> |
606 | - <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi") . ".managed</string>"; |
|
606 | + <string>com.apple." . ($blocktype == MobileconfigSuperclass::NETWORK_BLOCK_TYPE_WIRED ? "firstactiveethernet" : "wifi").".managed</string>"; |
|
607 | 607 | $retval .= $this->proxySettings(); |
608 | 608 | $retval .= $setupModesString; |
609 | 609 | if ($eapType['INNER'] == \core\common\EAP::NE_SILVERBULLET) { |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | } |
616 | 616 | $retval .= " |
617 | 617 | <key>PayloadUUID</key> |
618 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
618 | + <string>" . \core\common\Entity::uuid()."</string> |
|
619 | 619 | <key>PayloadVersion</key> |
620 | 620 | <integer>1</integer> |
621 | 621 | $wifiNetworkIdentification</dict>"; |
@@ -645,15 +645,15 @@ discard block |
||
645 | 645 | <key>IsHotspot</key> |
646 | 646 | <false/> |
647 | 647 | <key>PayloadDescription</key> |
648 | - <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</string> |
|
648 | + <string>" . sprintf(_("This SSID should not be used after bootstrapping %s"), \config\ConfAssistant::CONSORTIUM['display_name'])."</string> |
|
649 | 649 | <key>PayloadDisplayName</key> |
650 | - <string>" . _("Disabled WiFi network") . "</string> |
|
650 | + <string>" . _("Disabled WiFi network")."</string> |
|
651 | 651 | <key>PayloadIdentifier</key> |
652 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
652 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang.wifi.disabled.$this->removeSerial</string> |
|
653 | 653 | <key>PayloadType</key> |
654 | 654 | <string>com.apple.wifi.managed</string> |
655 | 655 | <key>PayloadUUID</key> |
656 | - <string>" . \core\common\Entity::uuid() . "</string> |
|
656 | + <string>".\core\common\Entity::uuid()."</string> |
|
657 | 657 | <key>PayloadVersion</key> |
658 | 658 | <real>1</real>"; |
659 | 659 | $retval .= $this->proxySettings(); |
@@ -733,12 +733,12 @@ discard block |
||
733 | 733 | $mimeBlob = base64_encode($binaryBlob); |
734 | 734 | $mimeFormatted = chunk_split($mimeBlob, 52, "\r\n"); |
735 | 735 | $payloadUUID = \core\common\Entity::uuid('', $mimeBlob); |
736 | - $retArray = ["block" => "<dict>" . |
|
736 | + $retArray = ["block" => "<dict>". |
|
737 | 737 | // we don't include the import password. It's displayed on screen, and should be input by the user. |
738 | 738 | // <key>Password</key> |
739 | 739 | // <string>" . $this->clientCert['password'] . "</string> |
740 | 740 | "<key>PayloadCertificateFileName</key> |
741 | - <string>" . $this->massagedConsortium . ".pfx</string> |
|
741 | + <string>" . $this->massagedConsortium.".pfx</string> |
|
742 | 742 | <key>PayloadContent</key> |
743 | 743 | <data> |
744 | 744 | $mimeFormatted |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | <key>PayloadDescription</key> |
747 | 747 | <string>MIME Base-64 encoded PKCS#12 Client Certificate</string> |
748 | 748 | <key>PayloadDisplayName</key> |
749 | - <string>" . _("User certificate") . "</string> |
|
749 | + <string>"._("User certificate")."</string> |
|
750 | 750 | <key>PayloadIdentifier</key> |
751 | 751 | <string>com.apple.security.pkcs12.$payloadUUID</string> |
752 | 752 | <key>PayloadType</key> |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | <key>PayloadVersion</key> |
757 | 757 | <integer>1</integer> |
758 | 758 | </dict>", |
759 | - "UUID" => $payloadUUID,]; |
|
759 | + "UUID" => $payloadUUID, ]; |
|
760 | 760 | \core\common\Entity::outOfThePotatoes(); |
761 | 761 | return $retArray; |
762 | 762 | } |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | } |
775 | 775 | $expiryTime = new \DateTime($this->clientCert['certObject']->expiry); |
776 | 776 | return "<key>RemovalDate</key> |
777 | - <date>" . $expiryTime->format("Y-m-d") . "T" . $expiryTime->format("H:i:s") . "Z</date>"; |
|
777 | + <date>" . $expiryTime->format("Y-m-d")."T".$expiryTime->format("H:i:s")."Z</date>"; |
|
778 | 778 | } |
779 | 779 | |
780 | 780 | /** |
@@ -796,27 +796,27 @@ discard block |
||
796 | 796 | $stream = " |
797 | 797 | <dict> |
798 | 798 | <key>PayloadCertificateFileName</key> |
799 | - <string>" . $ca['uuid'] . ".der</string> |
|
799 | + <string>" . $ca['uuid'].".der</string> |
|
800 | 800 | <key>PayloadContent</key> |
801 | 801 | <data> |
802 | -" . $trimmedPem . "</data> |
|
802 | +" . $trimmedPem."</data> |
|
803 | 803 | <key>PayloadDescription</key> |
804 | - <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst) . "</string> |
|
804 | + <string>" . sprintf(_("The %s Certification Authority"), \core\common\Entity::$nomenclature_inst)."</string> |
|
805 | 805 | <key>PayloadDisplayName</key> |
806 | 806 | <string>" . |
807 | 807 | /// example: "Identity Provider CA #1 (Root)" |
808 | - sprintf(_("%s CA #%d (%s)" ), |
|
808 | + sprintf(_("%s CA #%d (%s)"), |
|
809 | 809 | \core\common\Entity::$nomenclature_inst, |
810 | - count($this->CAsAccountedFor)+1, |
|
811 | - ($ca['root'] ? _("Root") : _("Intermediate"))) . |
|
810 | + count($this->CAsAccountedFor) + 1, |
|
811 | + ($ca['root'] ? _("Root") : _("Intermediate"))). |
|
812 | 812 | "</string> |
813 | 813 | <key>PayloadIdentifier</key> |
814 | - <string>" . self::IPHONE_PAYLOAD_PREFIX . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
814 | + <string>" . self::IPHONE_PAYLOAD_PREFIX.".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.credential.$this->caSerial</string> |
|
815 | 815 | <key>PayloadOrganization</key> |
816 | - <string>" . $this->massagedConsortium . ".1x-config.org</string> |
|
816 | + <string>".$this->massagedConsortium.".1x-config.org</string> |
|
817 | 817 | <key>PayloadType</key> |
818 | 818 | <string>com.apple.security.root</string> |
819 | - <key>PayloadUUID</key><string>" . $ca['uuid'] . "</string> |
|
819 | + <key>PayloadUUID</key><string>" . $ca['uuid']."</string> |
|
820 | 820 | <key>PayloadVersion</key> |
821 | 821 | <integer>1</integer> |
822 | 822 | </dict>"; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | const DOWNLOAD_REDIRECT_CONTINUE = 1054; |
52 | 52 | const SB_GO_AWAY = 1060; |
53 | 53 | const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061; |
54 | -const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062; |
|
54 | +const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062; |
|
55 | 55 | |
56 | 56 | |
57 | 57 | /** |
@@ -103,13 +103,13 @@ discard block |
||
103 | 103 | ]; |
104 | 104 | $this->templates[WELCOME_ABOARD_TERMS] = ""; |
105 | 105 | foreach ($this->templates[NETWORK_TERMS_AND_PRIV] as $consortium => $terms) { |
106 | - $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("Please remember that when connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU_LINK'], $terms['PRIV_LINK']); |
|
106 | + $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("Please remember that when connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.")."</p>", $consortium, $terms['TOU_LINK'], $terms['PRIV_LINK']); |
|
107 | 107 | } |
108 | 108 | // $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>"; |
109 | 109 | $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads"); |
110 | 110 | $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("We would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), \config\ConfAssistant::CONSORTIUM['display_name']); |
111 | 111 | $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), \config\Master::APPEARANCE['productname']); |
112 | - $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),\config\ConfAssistant::CONSORTIUM['display_name']); |
|
112 | + $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), \config\ConfAssistant::CONSORTIUM['display_name']); |
|
113 | 113 | $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), \config\ConfAssistant::CONSORTIUM['display_name']); |
114 | 114 | $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation"); |
115 | 115 | $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $deco = new \web\lib\admin\PageDecoration(); |
25 | 25 | $validator = new \web\lib\common\InputValidation(); |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | |
45 | 45 | $preflist = $my_profile->getEapMethodsinOrderOfPreference(); |
46 | 46 | ?> |
47 | - <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption;?></h1> |
|
47 | + <h1><?php $tablecaption = sprintf(_("Device compatiblity matrix for %s of %s "), $profile_name, $inst_name); echo $tablecaption; ?></h1> |
|
48 | 48 | <table class="compatmatrix"> |
49 | - <caption><?php echo $tablecaption;?></caption> |
|
49 | + <caption><?php echo $tablecaption; ?></caption> |
|
50 | 50 | <tr> |
51 | 51 | <th scope='col'></th> |
52 | 52 | <th scope='col'><?php echo _("Device"); ?></th> |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | <?php |
55 | 55 | foreach ($preflist as $method) { |
56 | 56 | $escapedMethod = $method->getIntegerRep(); |
57 | - echo "<th scope='col' style='min-width:200px'>" . $method->getPrintableRep() . "<br/> |
|
57 | + echo "<th scope='col' style='min-width:200px'>".$method->getPrintableRep()."<br/> |
|
58 | 58 | <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
59 | 59 | <input type='hidden' name='eaptype' value='$escapedMethod'> |
60 | - <button class='redirect' type='submit'>" . _("EAP-Type-specific options...") . "</button> |
|
60 | + <button class='redirect' type='submit'>"._("EAP-Type-specific options...")."</button> |
|
61 | 61 | </form></th>"; |
62 | 62 | } |
63 | 63 | ?> |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | foreach (\devices\Devices::listDevices() as $index => $description) { |
74 | 74 | |
75 | 75 | echo "<tr>"; |
76 | - echo "<td align='center'><img src='../resources/images/vendorlogo/" . $description['group'] . ".png' alt='logo'></td><td>" . $description['display'] . "<br/> |
|
76 | + echo "<td align='center'><img src='../resources/images/vendorlogo/".$description['group'].".png' alt='logo'></td><td>".$description['display']."<br/> |
|
77 | 77 | <form method='post' action='inc/toggleRedirect.inc.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> |
78 | 78 | <input type='hidden' name='device' value='$index'> |
79 | - <button class='redirect' type='submit'>" . _("Device-specific options...") . "</button> |
|
79 | + <button class='redirect' type='submit'>"._("Device-specific options...")."</button> |
|
80 | 80 | </form> |
81 | 81 | </td>"; |
82 | 82 | $factory = new \core\DeviceFactory($index); |
@@ -85,16 +85,16 @@ discard block |
||
85 | 85 | $footnotesForDevEapCombo = []; |
86 | 86 | $display_footnote = FALSE; |
87 | 87 | $langObject = new \core\common\Language(); |
88 | - $downloadform = "<form action='" . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/') . "/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=" . $langObject->getLang() . "' method='post' accept-charset='UTF-8'> |
|
88 | + $downloadform = "<form action='".rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/')."/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&lang=".$langObject->getLang()."' method='post' accept-charset='UTF-8'> |
|
89 | 89 | <input type='hidden' name='device' value='$index'/> |
90 | 90 | <input type='hidden' name='generatedfor' value='admin'/> |
91 | - <button class='download'>" . sprintf(_("%s<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name']) . "</button> |
|
91 | + <button class='download'>".sprintf(_("%s<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name'])."</button> |
|
92 | 92 | "; |
93 | 93 | if (sizeof($my_profile->getAttributes("media:openroaming")) > 0 && isset($factory->device->options['hs20']) && $factory->device->options['hs20'] == 1) { |
94 | - $downloadform .= "<form action='" . rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/') . "/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&openroaming=1&lang=" . $langObject->getLang() . "' method='post' accept-charset='UTF-8'> |
|
94 | + $downloadform .= "<form action='".rtrim(dirname(dirname($_SERVER['SCRIPT_NAME'])), '/')."/user/API.php?action=downloadInstaller&profile=$my_profile->identifier&openroaming=1&lang=".$langObject->getLang()."' method='post' accept-charset='UTF-8'> |
|
95 | 95 | <input type='hidden' name='device' value='$index'/> |
96 | 96 | <input type='hidden' name='generatedfor' value='admin'/> |
97 | - <button class='download'>" . sprintf(_("%s + OpenRoaming<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name']) . "</button> |
|
97 | + <button class='download'>".sprintf(_("%s + OpenRoaming<br/>Installer"), config\ConfAssistant::CONSORTIUM['display_name'])."</button> |
|
98 | 98 | "; |
99 | 99 | } |
100 | 100 | |
@@ -163,8 +163,8 @@ discard block |
||
163 | 163 | </table> |
164 | 164 | <p><strong><?php $tablecaption2 = _("Legend:"); echo $tablecaption2; ?></strong></p> |
165 | 165 | <table class="compatmatrix"> |
166 | - <caption><?php echo $tablecaption2;?></caption> |
|
167 | - <tr><th scope="col"><?php echo _("Colour");?></th><th scope='col'><?php echo _("Meaning");?></th></tr> |
|
166 | + <caption><?php echo $tablecaption2; ?></caption> |
|
167 | + <tr><th scope="col"><?php echo _("Colour"); ?></th><th scope='col'><?php echo _("Meaning"); ?></th></tr> |
|
168 | 168 | <tr><td class="compat_redirected"> </td> <td><?php echo _("redirection is set"); ?></td></tr> |
169 | 169 | <tr><td class="compat_default"> </td> <td><?php echo _("will be offered on download site"); ?></td></tr> |
170 | 170 | <tr><td class="compat_secondary"> </td> <td><?php echo _("configured, but not preferred EAP type"); ?></td></tr> |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | </table> |
174 | 174 | <?php |
175 | 175 | if (count($distinctFootnotes)) { |
176 | - echo "<p><strong>" . _("Footnotes:") . "</strong></p><table>"; |
|
176 | + echo "<p><strong>"._("Footnotes:")."</strong></p><table>"; |
|
177 | 177 | foreach ($distinctFootnotes as $number => $text) { |
178 | 178 | echo "<tr><td>($number) - </td><td>$text</td></tr>"; |
179 | 179 | } |
@@ -767,7 +767,7 @@ |
||
767 | 767 | </tr></table>"; |
768 | 768 | } |
769 | 769 | if (count($orrealm)) { |
770 | - echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong> |
|
770 | + echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong> |
|
771 | 771 | <table><tr> |
772 | 772 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_openroaming_ico' class='icon'></td><td id='main_openroaming_result' style='display:none'> </td> |
773 | 773 | </tr></table>"; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $loggerInstance = new \core\common\Logging(); |
25 | 25 | |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | $testsuite = new \core\diag\RADIUSTests($check_realm, $testedProfile->getRealmCheckOuterUsername(), $testedProfile->getEapMethodsinOrderOfPreference(1), $testedProfile->getCollapsedAttributes()['eap:server_name'], $testedProfile->getCollapsedAttributes()["eap:ca_file"]); |
67 | 67 | $rfc7585suite = new \core\diag\RFC7585Tests($check_realm); |
68 | 68 | } else { |
69 | - $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>"; |
|
69 | + $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>"; |
|
70 | 70 | } |
71 | 71 | } else { // someone else's realm, and we don't know anything about it... only shallow checks |
72 | 72 | $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? ""); |
73 | 73 | if ($check_realm !== FALSE) { |
74 | 74 | $_SESSION['check_realm'] = $check_realm; |
75 | - $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm); |
|
75 | + $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm); |
|
76 | 76 | $rfc7585suite = new \core\diag\RFC7585Tests($check_realm); |
77 | 77 | //print '<pre>'; print_r($rfc7585suite); print '</pre>'; |
78 | 78 | } else { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>"; |
121 | 121 | var getitfrom = "<?php echo _("Get it from here.") ?>"; |
122 | 122 | var listsource = "<?php echo \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] ?>"; |
123 | - var moretext = "<?php echo _("more") . "»" ?>"; |
|
123 | + var moretext = "<?php echo _("more")."»" ?>"; |
|
124 | 124 | var lesstext = "<?php echo "«" ?>"; |
125 | 125 | var morealltext = "<?php echo _("Show detailed information for all tests") ?>"; |
126 | 126 | var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>"; |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | } |
264 | 264 | } |
265 | 265 | cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state; |
266 | - cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ") . ")"; ?>' + add + '</td></tr>'; |
|
266 | + cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+' ").")"; ?>' + add + '</td></tr>'; |
|
267 | 267 | cliinfo = cliinfo + '</tbody></table></ul></li>'; |
268 | 268 | if (data.ca[key].certificate[c].finalerror === 1) { |
269 | 269 | cliinfo = cliinfo + '<li>' + restskipped + '</li>'; |
@@ -466,8 +466,8 @@ discard block |
||
466 | 466 | <?php |
467 | 467 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
468 | 468 | print " |
469 | -$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading); |
|
470 | -$(\"#live_src" . $hostindex . "_img\").show(); |
|
469 | +$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading); |
|
470 | +$(\"#live_src" . $hostindex."_img\").show(); |
|
471 | 471 | $.ajax({ |
472 | 472 | url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm, |
473 | 473 | type: 'POST', |
@@ -497,15 +497,15 @@ discard block |
||
497 | 497 | <?php |
498 | 498 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
499 | 499 | if ($testedProfile !== NULL) { |
500 | - $extraarg = "profile_id: " . $testedProfile->identifier . ", "; |
|
500 | + $extraarg = "profile_id: ".$testedProfile->identifier.", "; |
|
501 | 501 | } else { |
502 | 502 | $extraarg = ""; |
503 | 503 | } |
504 | 504 | print " |
505 | -$(\"#src" . $hostindex . "_img\").attr('src',icon_loading); |
|
505 | +$(\"#src" . $hostindex."_img\").attr('src',icon_loading); |
|
506 | 506 | $(\"#src$hostindex\").html(''); |
507 | 507 | running_ajax_stat++; |
508 | -$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, udp, 'json'); |
|
508 | +$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, udp, 'json'); |
|
509 | 509 | |
510 | 510 | "; |
511 | 511 | } |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | if ($check_realm === FALSE) { |
533 | 533 | print "<p>$error_message</p>"; |
534 | 534 | } else { |
535 | - print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n"; |
|
535 | + print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n"; |
|
536 | 536 | ?> |
537 | 537 | <div id="debug_out" style="display: none"></div> |
538 | 538 | <div id="tabs" style="min-width: 600px; max-width:1000px"> |
@@ -550,12 +550,12 @@ discard block |
||
550 | 550 | </legend> |
551 | 551 | <?php |
552 | 552 | // NAPTR existence check |
553 | - echo "<strong>" . _("DNS checks") . "</strong><div>"; |
|
553 | + echo "<strong>"._("DNS checks")."</strong><div>"; |
|
554 | 554 | $naptr = $rfc7585suite->relevantNAPTR(); |
555 | 555 | if ($naptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
556 | 556 | echo "<table>"; |
557 | 557 | // output in friendly words |
558 | - echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
558 | + echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
559 | 559 | switch ($naptr) { |
560 | 560 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
561 | 561 | echo _("This realm has no NAPTR records."); |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | |
571 | 571 | // compliance checks for NAPTRs |
572 | 572 | if ($naptr > 0) { |
573 | - echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
573 | + echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
574 | 574 | $naptr_valid = $rfc7585suite->relevantNAPTRcompliance(); |
575 | 575 | switch ($naptr_valid) { |
576 | 576 | case \core\diag\RADIUSTests::RETVAL_OK: |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | |
588 | 588 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) { |
589 | 589 | $srv = $rfc7585suite->relevantNAPTRsrvResolution(); |
590 | - echo "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
590 | + echo "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
591 | 591 | switch ($srv) { |
592 | 592 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
593 | 593 | echo _("This check was skipped."); |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | // IP addresses for the hosts |
604 | 604 | if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) { |
605 | 605 | $hosts = $rfc7585suite->relevantNAPTRhostnameResolution(); |
606 | - echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
606 | + echo "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
607 | 607 | switch ($srv) { |
608 | 608 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
609 | 609 | echo _("This check was skipped."); |
@@ -619,12 +619,12 @@ discard block |
||
619 | 619 | |
620 | 620 | echo "</table><br/><br/>"; |
621 | 621 | if (count($testsuite->listerrors()) == 0) { |
622 | - echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!"); |
|
622 | + echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!"); |
|
623 | 623 | } else { |
624 | - echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below."); |
|
624 | + echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below."); |
|
625 | 625 | echo "<div class='notacceptable'><table>"; |
626 | 626 | foreach ($testsuite->listerrors() as $details) { |
627 | - echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>"; |
|
627 | + echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>"; |
|
628 | 628 | } |
629 | 629 | echo "</table></div>"; |
630 | 630 | } |
@@ -640,29 +640,29 @@ discard block |
||
640 | 640 | $("#dynamic_tests").show(); |
641 | 641 | '; |
642 | 642 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
643 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
643 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
644 | 644 | $expectedName = $addr['hostname']; |
645 | 645 | print " |
646 | 646 | running_ajax_dyn++; |
647 | - $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); |
|
647 | + $.ajax({url:'radius_tests.php', data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); |
|
648 | 648 | running_ajax_dyn++; |
649 | - $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); |
|
649 | + $.ajax({url:'radius_tests.php', data:{test_type: 'clients', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); |
|
650 | 650 | "; |
651 | 651 | } |
652 | 652 | echo "} |
653 | 653 | </script>"; |
654 | 654 | } else { |
655 | - echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>"; |
|
655 | + echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>"; |
|
656 | 656 | } |
657 | 657 | #### OpenRoaming |
658 | 658 | if (count($orrealm)) { |
659 | - echo "<br><strong>" . _("OpenRoaming DNS checks") . "</strong><div>"; |
|
659 | + echo "<br><strong>"._("OpenRoaming DNS checks")."</strong><div>"; |
|
660 | 660 | $dnsChecks = new \core\diag\RFC7585Tests($check_realm, "aaa+auth:radius.tls.tcp"); |
661 | 661 | $ornaptr = $dnsChecks->relevantNAPTR(); |
662 | 662 | if ($ornaptr != \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) { |
663 | 663 | echo "<table>"; |
664 | 664 | // output in friendly words |
665 | - echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>"; |
|
665 | + echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>"; |
|
666 | 666 | switch ($ornaptr) { |
667 | 667 | case \core\diag\RFC7585Tests::RETVAL_NONAPTR: |
668 | 668 | echo _("This realm has no NAPTR records."); |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | |
678 | 678 | // compliance checks for NAPTRs |
679 | 679 | if ($ornaptr > 0) { |
680 | - echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>"; |
|
680 | + echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>"; |
|
681 | 681 | $naptr_valid = $dnsChecks->relevantNAPTRcompliance(); |
682 | 682 | switch ($naptr_valid) { |
683 | 683 | case \core\diag\RADIUSTests::RETVAL_OK: |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | |
695 | 695 | if ($ornaptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) { |
696 | 696 | $srv = $dnsChecks->relevantNAPTRsrvResolution(); |
697 | - echo "<tr><td>" . _("Checking SRVs:") . "</td><td>"; |
|
697 | + echo "<tr><td>"._("Checking SRVs:")."</td><td>"; |
|
698 | 698 | switch ($srv) { |
699 | 699 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
700 | 700 | echo _("This check was skipped."); |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | // IP addresses for the hosts |
711 | 711 | if ($ornaptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) { |
712 | 712 | $hosts = $dnsChecks->relevantNAPTRhostnameResolution(); |
713 | - echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>"; |
|
713 | + echo "<tr><td>"._("Checking IP address resolution:")."</td><td>"; |
|
714 | 714 | switch ($srv) { |
715 | 715 | case \core\diag\RADIUSTests::RETVAL_SKIPPED: |
716 | 716 | echo _("This check was skipped."); |
@@ -727,7 +727,7 @@ discard block |
||
727 | 727 | echo "</table><br/><br/>"; |
728 | 728 | echo '</div>'; |
729 | 729 | foreach ($dnsChecks->NAPTR_hostname_records as $hostindex => $addr) { |
730 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
730 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
731 | 731 | $expectedName = $addr['hostname']; |
732 | 732 | print '<br>'; print "$host $hostindex $expectedName"; print '</br>'; |
733 | 733 | } |
@@ -742,32 +742,32 @@ discard block |
||
742 | 742 | $("#openroaming_tests").show(); |
743 | 743 | '; |
744 | 744 | foreach ($dnsChecks->NAPTR_hostname_records as $hostindex => $addr) { |
745 | - $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port']; |
|
745 | + $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port']; |
|
746 | 746 | $expectedName = $addr['hostname']; |
747 | 747 | print " |
748 | 748 | running_ajax_openroaming++; |
749 | - $.ajax({url:'radius_tests.php', data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); |
|
749 | + $.ajax({url:'radius_tests.php', data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); |
|
750 | 750 | "; |
751 | 751 | } |
752 | 752 | echo "} |
753 | 753 | </script><hr>"; |
754 | 754 | } else { |
755 | - echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>"; |
|
755 | + echo "<tr><td>"._("OpenRoaming connectivity test is not configured")."</td><td>"; |
|
756 | 756 | } |
757 | 757 | } |
758 | 758 | #### OpenRoaming |
759 | - echo "<strong>" . _("Static connectivity tests") . "</strong> |
|
759 | + echo "<strong>"._("Static connectivity tests")."</strong> |
|
760 | 760 | <table><tr> |
761 | 761 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_static_ico' class='icon'></td><td id='main_static_result' style='display:none'> </td> |
762 | 762 | </tr></table>"; |
763 | 763 | if ($naptr > 0) { |
764 | - echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong> |
|
764 | + echo "<hr><strong>"._("Dynamic connectivity tests")."</strong> |
|
765 | 765 | <table><tr> |
766 | 766 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result' style='display:none'> </td> |
767 | 767 | </tr></table>"; |
768 | 768 | } |
769 | 769 | if (count($orrealm)) { |
770 | - echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong> |
|
770 | + echo "<hr><strong>"._("OpenRoaming connectivity tests")."</strong> |
|
771 | 771 | <table><tr> |
772 | 772 | <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_openroaming_ico' class='icon'></td><td id='main_openroaming_result' style='display:none'> </td> |
773 | 773 | </tr></table>"; |
@@ -787,12 +787,12 @@ discard block |
||
787 | 787 | print "<p>"; |
788 | 788 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
789 | 789 | print "<hr>"; |
790 | - printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
790 | + printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
791 | 791 | print "<table id='results$hostindex' style='width:100%' class='udp_results'> |
792 | 792 | <tr> |
793 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td> |
|
793 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td> |
|
794 | 794 | <td id='src$hostindex' colspan=2> |
795 | -" . _("testing...") . " |
|
795 | +"._("testing...")." |
|
796 | 796 | </td> |
797 | 797 | </tr> |
798 | 798 | </table>"; |
@@ -811,21 +811,21 @@ discard block |
||
811 | 811 | |
812 | 812 | <?php |
813 | 813 | echo "<div id='dynamic_tests'><fieldset class='option_container'> |
814 | - <legend><strong>" . _("DYNAMIC connectivity tests") . "</strong></legend>"; |
|
814 | + <legend><strong>" . _("DYNAMIC connectivity tests")."</strong></legend>"; |
|
815 | 815 | |
816 | 816 | $resultstoprint = []; |
817 | 817 | if (count($rfc7585suite->NAPTR_hostname_records) > 0) { |
818 | - $resultstoprint[] = '<div style="align:right; display: none;" id="dynamic_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:right; display: none;" id="dynamic_result_pass">' . _("All tests passed, congratulations!") . '</div>'; |
|
819 | - $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
818 | + $resultstoprint[] = '<div style="align:right; display: none;" id="dynamic_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:right; display: none;" id="dynamic_result_pass">'._("All tests passed, congratulations!").'</div>'; |
|
819 | + $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
820 | 820 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
821 | - $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]); |
|
822 | - $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>'; |
|
821 | + $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]); |
|
822 | + $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>'; |
|
823 | 823 | $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
824 | 824 | $resultstoprint[] = "<table id='caresults$hostindex' style='width:100%'> |
825 | 825 | <tr> |
826 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca" . $hostindex . "_img'></td> |
|
826 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcca".$hostindex."_img'></td> |
|
827 | 827 | <td id='srcca$hostindex'> |
828 | -" . _("testing...") . " |
|
828 | +"._("testing...")." |
|
829 | 829 | </td> |
830 | 830 | </tr> |
831 | 831 | </table>"; |
@@ -833,12 +833,12 @@ discard block |
||
833 | 833 | } |
834 | 834 | $clientstest = []; |
835 | 835 | foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) { |
836 | - $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
|
836 | + $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>'; |
|
837 | 837 | $clientstest[] = "<span id='clientresults$hostindex$clinx'><table style='width:100%'> |
838 | 838 | <tr> |
839 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient" . $hostindex . "_img'></td> |
|
839 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='srcclient".$hostindex."_img'></td> |
|
840 | 840 | <td id='srcclient$hostindex'> |
841 | -" . _("testing...") . " |
|
841 | +"._("testing...")." |
|
842 | 842 | </td> |
843 | 843 | </tr> |
844 | 844 | </table></span>"; |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | } |
847 | 847 | echo '<div style="align:right;">'; |
848 | 848 | echo join('', $resultstoprint); |
849 | - echo '<span id="clientstest" style="display: none;"><p><hr><b>' . _('Checking if certificates from CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>'; |
|
849 | + echo '<span id="clientstest" style="display: none;"><p><hr><b>'._('Checking if certificates from CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>'; |
|
850 | 850 | print join('', $clientstest); |
851 | 851 | echo '</span>'; |
852 | 852 | echo '</div>'; |
@@ -863,17 +863,17 @@ discard block |
||
863 | 863 | echo _("OpenRoaming connectivity tests").'</strong></legend>'; |
864 | 864 | $resultstoprint = []; |
865 | 865 | if (count($dnsChecks->NAPTR_hostname_records) > 0) { |
866 | - $resultstoprint[] = '<div style="align:right; display: none;" id="openroaming_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:right; display: none;" id="dynamic_result_pass">' . _("All tests passed, congratulations!") . '</div>'; |
|
867 | - $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>"; |
|
866 | + $resultstoprint[] = '<div style="align:right; display: none;" id="openroaming_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:right; display: none;" id="dynamic_result_pass">'._("All tests passed, congratulations!").'</div>'; |
|
867 | + $resultstoprint[] = '<div style="align:right;"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>"; |
|
868 | 868 | foreach ($dnsChecks->NAPTR_hostname_records as $hostindex => $addr) { |
869 | - $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]); |
|
870 | - $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>'; |
|
869 | + $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]); |
|
870 | + $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>'; |
|
871 | 871 | $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>'; |
872 | 872 | $resultstoprint[] = "<table id='openroamingcaresults$hostindex' style='width:100%'> |
873 | 873 | <tr> |
874 | -<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='openroamingsrcca" . $hostindex . "_img'></td> |
|
874 | +<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='openroamingsrcca".$hostindex."_img'></td> |
|
875 | 875 | <td id='openroamingsrcca$hostindex'> |
876 | -" . _("testing...") . " |
|
876 | +"._("testing...")." |
|
877 | 877 | </td> |
878 | 878 | </tr> |
879 | 879 | </table>"; |
@@ -881,20 +881,20 @@ discard block |
||
881 | 881 | } |
882 | 882 | $clientstest = []; |
883 | 883 | foreach ($dnsChecks->NAPTR_hostname_records as $hostindex => $addr) { |
884 | - $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>'; |
|
884 | + $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>'; |
|
885 | 885 | $clientstest[] = "<span id='openroamingclientresults$hostindex$clinx'><table style='width:100%'> |
886 | 886 | <tr> |
887 | -<td class='icon_td'><!--<img src='../resources/images/icons/loading51.gif' id='openroamingsrcclient" . $hostindex . "_img'></td> |
|
887 | +<td class='icon_td'><!--<img src='../resources/images/icons/loading51.gif' id='openroamingsrcclient".$hostindex."_img'></td> |
|
888 | 888 | <td id='srcclient$hostindex'> |
889 | -" . _("testing...") . " |
|
890 | --->" . _("not implemented yet") ."</td> |
|
889 | +"._("testing...")." |
|
890 | +-->" . _("not implemented yet")."</td> |
|
891 | 891 | </tr> |
892 | 892 | </table></span>"; |
893 | 893 | $clientstest[] = '</ol>'; |
894 | 894 | } |
895 | 895 | echo '<div style="align:right;">'; |
896 | 896 | echo join('', $resultstoprint); |
897 | - echo '<span id="openroamingclientstest" style="display: none;"><p><hr><b>' . _('Checking if certificates from CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>'; |
|
897 | + echo '<span id="openroamingclientstest" style="display: none;"><p><hr><b>'._('Checking if certificates from CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>'; |
|
898 | 898 | print join('', $clientstest); |
899 | 899 | echo '</span>'; |
900 | 900 | echo '</div>'; |
@@ -908,7 +908,7 @@ discard block |
||
908 | 908 | // check if truncates/dies on Operator-Name |
909 | 909 | if ($my_profile !== NULL) { |
910 | 910 | echo "<div id='tabs-n'><fieldset class='option_container'> |
911 | - <legend><strong>" . _("Live login test") . "</strong></legend>"; |
|
911 | + <legend><strong>" . _("Live login test")."</strong></legend>"; |
|
912 | 912 | $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1); |
913 | 913 | if (count($prof_compl) > 0) { |
914 | 914 | $passwordReqired = FALSE; |
@@ -921,34 +921,34 @@ discard block |
||
921 | 921 | $clientCertRequired = TRUE; |
922 | 922 | } |
923 | 923 | } |
924 | - echo "<div id='disposable_credential_container'><p>" . _("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.") . "</p> |
|
925 | - <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.") . "</p> |
|
926 | - <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!") . "</p></div> |
|
924 | + echo "<div id='disposable_credential_container'><p>"._("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.")."</p> |
|
925 | + <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.")."</p> |
|
926 | + <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!")."</p></div> |
|
927 | 927 | <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'> |
928 | 928 | <input type='hidden' name='test_type' value='udp_login'> |
929 | - <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'> |
|
930 | - <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'> |
|
929 | + <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'> |
|
930 | + <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'> |
|
931 | 931 | <table id='live_tests'>"; |
932 | 932 | // if any password based EAP methods are available enable this section |
933 | 933 | if ($passwordReqired) { |
934 | - echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr> |
|
935 | - <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
936 | - echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
937 | - echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
934 | + echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr> |
|
935 | + <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>"; |
|
936 | + echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>"; |
|
937 | + echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>"; |
|
938 | 938 | } |
939 | 939 | // ask for cert + privkey if TLS-based method is active |
940 | 940 | if ($clientCertRequired) { |
941 | - echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr> |
|
942 | - <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
943 | - <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
944 | - <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
941 | + echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr> |
|
942 | + <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr> |
|
943 | + <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr> |
|
944 | + <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>"; |
|
945 | 945 | } |
946 | - echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>"; |
|
946 | + echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>"; |
|
947 | 947 | echo "<div id='live_login_results' style='display:none'>"; |
948 | 948 | foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
949 | 949 | print "<hr>"; |
950 | - printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>"); |
|
951 | - print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src" . $hostindex . "_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>"; |
|
950 | + printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>"); |
|
951 | + print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src".$hostindex."_img' style='width:24px; position: absolute; left: 20px; bottom: 0px; '></span>"; |
|
952 | 952 | print "<div id='eap_test$hostindex' class='eap_test_results'></div>"; |
953 | 953 | } |
954 | 954 | echo "</div>"; |
@@ -963,9 +963,9 @@ discard block |
||
963 | 963 | } |
964 | 964 | |
965 | 965 | if (isset($_POST['comefrom'])) { |
966 | - $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" ); |
|
966 | + $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : ""); |
|
967 | 967 | echo "<form method='post' action='$return' accept-charset='UTF-8'> |
968 | - <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst) . "</button>" |
|
968 | + <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_inst)."</button>" |
|
969 | 969 | . "</form>"; |
970 | 970 | } |
971 | 971 | if ($check_realm !== FALSE) { |