@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function __construct() { |
| 63 | 63 | $this->loggerInstance = new Logging(); |
| 64 | - $this->loggerInstance->debug(3, "--- BEGIN constructing class ". get_class($this)." .\n"); |
|
| 64 | + $this->loggerInstance->debug(3, "--- BEGIN constructing class " . get_class($this) . " .\n"); |
|
| 65 | 65 | $this->languageInstance = new Language(); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * Logs the end of lifetime of the entity to the debug log on level 5. |
| 72 | 72 | */ |
| 73 | 73 | public function __destruct() { |
| 74 | - (new Logging())->debug(5,"--- KILL Destructing class ". get_class($this)." .\n"); |
|
| 74 | + (new Logging())->debug(5, "--- KILL Destructing class " . get_class($this) . " .\n"); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -56,8 +56,8 @@ |
||
| 56 | 56 | |
| 57 | 57 | $i = 0; |
| 58 | 58 | foreach ($salvageFedPrivs as $oneFed) { |
| 59 | - $_POST['option']["S123456789".$i] = "user:fedadmin#string##"; |
|
| 60 | - $_POST['value']["S123456789".$i."-0"] = $oneFed; |
|
| 59 | + $_POST['option']["S123456789" . $i] = "user:fedadmin#string##"; |
|
| 60 | + $_POST['value']["S123456789" . $i . "-0"] = $oneFed; |
|
| 61 | 61 | $i++; |
| 62 | 62 | } |
| 63 | 63 | ?> |
@@ -26,4 +26,4 @@ |
||
| 26 | 26 | $Gui->defaultPagePrelude(); |
| 27 | 27 | |
| 28 | 28 | // and now, serve actual data |
| 29 | -include("skins/".$Gui->skinObject->skin."/index.php"); |
|
| 29 | +include("skins/" . $Gui->skinObject->skin . "/index.php"); |
|
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * @package ModuleWriting |
| 20 | 20 | */ |
| 21 | 21 | namespace devices\xml; |
| 22 | -require_once(dirname(__FILE__).'/XML.inc.php'); |
|
| 22 | +require_once(dirname(__FILE__) . '/XML.inc.php'); |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * This class implements full functionality of the generic XML device |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | $objs = []; |
| 155 | 155 | if ($this->langScope === 'global') { |
| 156 | 156 | foreach ($attributeList['langs'] as $language => $value) { |
| 157 | - $language = ( $language === 'C' ? 'any' : $language ); |
|
| 157 | + $language = ($language === 'C' ? 'any' : $language); |
|
| 158 | 158 | $obj = new $className(); |
| 159 | 159 | $obj->setValue($value); |
| 160 | 160 | $obj->setAttributes(['lang' => $language]); |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $profileNameLangs = $attr['profile:name']['langs']; |
| 179 | 179 | } |
| 180 | 180 | foreach ($instNameLangs as $language => $value) { |
| 181 | - $language = ( $language === 'C' ? 'any' : $language ); |
|
| 181 | + $language = ($language === 'C' ? 'any' : $language); |
|
| 182 | 182 | $displayname = new DisplayName(); |
| 183 | 183 | if (isset($profileNameLangs)) { |
| 184 | 184 | $langOrC = isset($profileNameLangs[$language]) ? $profileNameLangs[$language] : $profileNameLangs['C']; |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | $clientCertificateObject->setValue(base64_encode($this->clientCert["certdata"])); |
| 352 | 352 | $clientCertificateObject->setAttributes(['format' => 'PKCS12', 'encoding' => 'base64']); |
| 353 | 353 | |
| 354 | - $clientsidecredential->setProperty('ClientCertificate',$clientCertificateObject); |
|
| 354 | + $clientsidecredential->setProperty('ClientCertificate', $clientCertificateObject); |
|
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | $authmethod->setProperty('ClientSideCredential', $clientsidecredential); |
@@ -12,11 +12,11 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | array_push($FAQ, [ |
| 14 | 14 | 'title' => sprintf(_("My %s is not listed. Can't I just use any of the other ones?"), $skinObject->nomenclature_inst), |
| 15 | - 'text' => sprintf(_("No! The installers contain security settings which are specific to the %s. If you are not from that %s, your computer will detect that you are about to send your username and credential to an unauthorised server and will abort the login. Using a different %s installer is <i>guaranteed to not work</i>!"),$skinObject->nomenclature_inst,$skinObject->nomenclature_inst,$skinObject->nomenclature_inst) |
|
| 15 | + 'text' => sprintf(_("No! The installers contain security settings which are specific to the %s. If you are not from that %s, your computer will detect that you are about to send your username and credential to an unauthorised server and will abort the login. Using a different %s installer is <i>guaranteed to not work</i>!"), $skinObject->nomenclature_inst, $skinObject->nomenclature_inst, $skinObject->nomenclature_inst) |
|
| 16 | 16 | ]); |
| 17 | 17 | |
| 18 | 18 | array_push($FAQ, [ |
| 19 | - 'title' => sprintf(_("What can I do to get my %s listed?"),$skinObject->nomenclature_inst), |
|
| 19 | + 'title' => sprintf(_("What can I do to get my %s listed?"), $skinObject->nomenclature_inst), |
|
| 20 | 20 | 'text' => sprintf(_("Contact %s administrators at your %s and complain. It will take at most one hour of their time to get things done."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $skinObject->nomenclature_inst) |
| 21 | 21 | ]); |
| 22 | 22 | |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam") { |
| 34 | 34 | array_push($FAQ, [ |
| 35 | - 'title' => sprintf(_("What is this %s thing anyway?"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
| 36 | - 'text' => sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'],CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
| 35 | + 'title' => sprintf(_("What is this %s thing anyway?"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']), |
|
| 36 | + 'text' => sprintf(_("%s is a global WiFi roaming consortium which gives members of education and research access to the internet <i>for free</i> on all %s hotspots on the planet. There are several million %s users already, enjoying free internet access on more than 6.000 hotspots! Visit <a href='http://www.eduroam.org'>the %s homepage</a> for more details."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) |
|
| 37 | 37 | ]); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | array_push($FAQ, [ |
| 41 | 41 | 'title' => sprintf(_("Is it safe to use %s installers?"), CONFIG['APPEARANCE']['productname']), |
| 42 | - 'text' => sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."), CONFIG['APPEARANCE']['productname']) . ' ' . ( isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."), CONFIG['APPEARANCE']['productname'], CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) : ""), |
|
| 42 | + 'text' => sprintf(_("%s installers configure security settings on your device, therefore you should be sure that you are using genuine ones."), CONFIG['APPEARANCE']['productname']) . ' ' . (isset(CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) && CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name'] != "" ? sprintf(_("This is why %s installers are digitally signed by %s. Watch out for a system message confirming this."), CONFIG['APPEARANCE']['productname'], CONFIG_CONFASSISTANT['CONSORTIUM']['signer_name']) : ""), |
|
| 43 | 43 | ]); |
| 44 | 44 | |
| 45 | 45 | array_push($FAQ, [ |
@@ -14,6 +14,6 @@ |
||
| 14 | 14 | $validator = new \web\lib\common\InputValidation(); |
| 15 | 15 | |
| 16 | 16 | echo "<pre>"; |
| 17 | -echo "Testing ".$validator->realm(filter_input(INPUT_GET,'realm', FILTER_SANITIZE_STRING))." in ".$validator->string(filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING)); |
|
| 17 | +echo "Testing " . $validator->realm(filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING)) . " in " . $validator->string(filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING)); |
|
| 18 | 18 | print_r($telepath->magic()); |
| 19 | 19 | echo "</pre>"; |
| 20 | 20 | \ No newline at end of file |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $federation = CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration']; |
| 60 | 60 | break; |
| 61 | 61 | default: |
| 62 | - $token = $validator->token(filter_input(INPUT_GET,'token',FILTER_SANITIZE_STRING)); |
|
| 62 | + $token = $validator->token(filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING)); |
|
| 63 | 63 | $checkval = $usermgmt->checkTokenValidity($token); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -84,14 +84,14 @@ |
||
| 84 | 84 | $langConverted[] = $hardSetLang; |
| 85 | 85 | } |
| 86 | 86 | if (!empty($_REQUEST['lang'])) { |
| 87 | - $recoverLang = filter_input(INPUT_GET,'lang', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'lang', FILTER_SANITIZE_STRING); |
|
| 87 | + $recoverLang = filter_input(INPUT_GET, 'lang', FILTER_SANITIZE_STRING) ?? filter_input(INPUT_POST, 'lang', FILTER_SANITIZE_STRING); |
|
| 88 | 88 | $langConverted[] = $recoverLang; |
| 89 | 89 | } |
| 90 | 90 | if (!empty($_SESSION['language'])) { |
| 91 | 91 | $langConverted[] = $_SESSION['language']; |
| 92 | 92 | } |
| 93 | 93 | if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
| 94 | - $langs = explode(",", filter_input(INPUT_SERVER,"HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING)); |
|
| 94 | + $langs = explode(",", filter_input(INPUT_SERVER, "HTTP_ACCEPT_LANGUAGE", FILTER_SANITIZE_STRING)); |
|
| 95 | 95 | foreach ($langs as $lang) { |
| 96 | 96 | $result = []; |
| 97 | 97 | preg_match("/(.*);+.*/", $lang, $result); |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | $cleanToken = FALSE; |
| 23 | 23 | $tokenStatus = ["status" => \core\ProfileSilverbullet::SB_TOKENSTATUS_INVALID, |
| 24 | - "cert_status" => [],]; |
|
| 24 | + "cert_status" => [], ]; |
|
| 25 | 25 | $profile = NULL; |
| 26 | 26 | $idp = NULL; |
| 27 | 27 | $fed = NULL; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | // it can be VALID (exists and not redeemed, EXPIRED, REDEEMED or INVALID (non existent) |
| 39 | 39 | $tokenStatus = \core\ProfileSilverbullet::tokenStatus($cleanToken); |
| 40 | 40 | } |
| 41 | -} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0']) ) { |
|
| 41 | +} elseif (isset($_SERVER['SSL_CLIENT_SAN_Email']) || isset($_SERVER['SSL_CLIENT_SAN_Email_0'])) { |
|
| 42 | 42 | // maybe the user authenticated with his client cert? Then pick any of his |
| 43 | 43 | // tokens to go on |
| 44 | 44 | $certname = $_SERVER['SSL_CLIENT_SAN_Email'] ?? $_SERVER['SSL_CLIENT_SAN_Email_0']; |