@@ -156,8 +156,8 @@ |
||
| 156 | 156 | // replace namespace separators with directory separators |
| 157 | 157 | // in the relative class name, append with .php |
| 158 | 158 | $file = $base_dir |
| 159 | - . str_replace('\\', '/', $relative_class) |
|
| 160 | - . '.php'; |
|
| 159 | + . str_replace('\\', '/', $relative_class) |
|
| 160 | + . '.php'; |
|
| 161 | 161 | |
| 162 | 162 | // if the mapped file exists, require it |
| 163 | 163 | if ($this->requireFile($file)) { |
@@ -97,10 +97,10 @@ |
||
| 97 | 97 | public function addNamespace($prefix, $base_dir, $prepend = false) |
| 98 | 98 | { |
| 99 | 99 | // normalize namespace prefix |
| 100 | - $prefix = trim($prefix, '\\') . '\\'; |
|
| 100 | + $prefix = trim($prefix, '\\').'\\'; |
|
| 101 | 101 | |
| 102 | 102 | // normalize the base directory with a trailing separator |
| 103 | - $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR) . '/'; |
|
| 103 | + $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR).'/'; |
|
| 104 | 104 | |
| 105 | 105 | // initialize the namespace prefix array |
| 106 | 106 | if (isset($this->prefixes[$prefix]) === false) { |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | ?> |
| 11 | 11 | <h1>Example Skin (main user frontpage)</h1> |
| 12 | -<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","consortium_logo.png");?>"/> |
|
| 12 | +<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "consortium_logo.png"); ?>"/> |
|
| 13 | 13 | <p>This skin is much more sober and less bloated than the default one. As it happens, it also doesn't do anything.</p> |
| 14 | 14 | <p>But at least it goes to show that it's possible to include custom images/CSS/external software using findResourceUrl(..., $filename): |
| 15 | -<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES","custom.png");?>"/> |
|
| 15 | +<img src="<?php echo $Gui->skinObject->findresourceUrl("IMAGES", "custom.png"); ?>"/> |
|
@@ -246,11 +246,11 @@ discard block |
||
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | /** |
| 249 | - * This function parses a X.509 cert and returns all certificatePolicies OIDs |
|
| 250 | - * |
|
| 251 | - * @param array $cert (returned from openssl_x509_parse) |
|
| 252 | - * @return array of OIDs |
|
| 253 | - */ |
|
| 249 | + * This function parses a X.509 cert and returns all certificatePolicies OIDs |
|
| 250 | + * |
|
| 251 | + * @param array $cert (returned from openssl_x509_parse) |
|
| 252 | + * @return array of OIDs |
|
| 253 | + */ |
|
| 254 | 254 | private function propertyCheckPolicy($cert) { |
| 255 | 255 | $oids = []; |
| 256 | 256 | if ($cert['extensions']['certificatePolicies']) { |
@@ -263,11 +263,11 @@ discard block |
||
| 263 | 263 | return $oids; |
| 264 | 264 | } |
| 265 | 265 | /** |
| 266 | - * This function parses a X.509 cert and returns the value of $field |
|
| 267 | - * |
|
| 268 | - * @param array $cert (returned from openssl_x509_parse) |
|
| 269 | - * @return string value of the issuer field or '' |
|
| 270 | - */ |
|
| 266 | + * This function parses a X.509 cert and returns the value of $field |
|
| 267 | + * |
|
| 268 | + * @param array $cert (returned from openssl_x509_parse) |
|
| 269 | + * @return string value of the issuer field or '' |
|
| 270 | + */ |
|
| 271 | 271 | private function getCertificateIssuer($cert) { |
| 272 | 272 | $issuer = ''; |
| 273 | 273 | foreach ($cert['issuer'] as $key => $val) { |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | use \Exception; |
| 25 | 25 | |
| 26 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
| 26 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Test suite to verify that a given NAI realm has NAPTR records according to |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | private function checkServerName($host) { |
| 145 | 145 | // it could match CN or sAN:DNS, we don't care which |
| 146 | 146 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['subject'])) { |
| 147 | - $this->loggerInstance->debug(4,"Checking expected server name ".$this->expectedName." against Subject: "); |
|
| 147 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against Subject: "); |
|
| 148 | 148 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['subject']); |
| 149 | 149 | // we are checking against accidental misconfig, not attacks, so loosely checking against end of string is appropriate |
| 150 | 150 | if (preg_match("/CN=".$this->expectedName."/", $this->TLS_CA_checks_result[$host]['certdata']['subject']) === 1) { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | if (isset($this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname'])) { |
| 155 | - $this->loggerInstance->debug(4,"Checking expected server name ".$this->expectedName." against sANs: "); |
|
| 155 | + $this->loggerInstance->debug(4, "Checking expected server name ".$this->expectedName." against sANs: "); |
|
| 156 | 156 | $this->loggerInstance->debug(4, $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']); |
| 157 | 157 | $testNames = $this->TLS_CA_checks_result[$host]['certdata']['extensions']['subjectaltname']; |
| 158 | 158 | if (!is_array($testNames)) { |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | } |
| 167 | - $this->loggerInstance->debug(3,"Tried to check expected server name ".$this->expectedName." but neither CN nor sANs matched."); |
|
| 167 | + $this->loggerInstance->debug(3, "Tried to check expected server name ".$this->expectedName." but neither CN nor sANs matched."); |
|
| 168 | 168 | |
| 169 | 169 | $this->TLS_CA_checks_result[$host]['cert_oddity'] = RADIUSTests::CERTPROB_DYN_SERVER_NAME_MISMATCH; |
| 170 | 170 | return FALSE; |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['status'] = $cert['status']; |
| 195 | 195 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['message'] = $this->TLS_certkeys[$cert['status']]; |
| 196 | 196 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k]['expected'] = $cert['expected']; |
| 197 | - $add = ' -cert ' . ROOT . '/config/cli-certs/' . $cert['public'] . ' -key ' . ROOT . '/config/cli-certs/' . $cert['private']; |
|
| 197 | + $add = ' -cert '.ROOT.'/config/cli-certs/'.$cert['public'].' -key '.ROOT.'/config/cli-certs/'.$cert['private']; |
|
| 198 | 198 | if (!isset($this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k])) { |
| 199 | 199 | $this->TLS_clients_checks_result[$host]['ca'][$type]['certificate'][$k] = []; |
| 200 | 200 | } |
@@ -238,11 +238,11 @@ discard block |
||
| 238 | 238 | // but code analysers want this more explicit, so here is this extra |
| 239 | 239 | // call to escapeshellarg() |
| 240 | 240 | $escapedHost = escapeshellarg($host); |
| 241 | - $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl'] . " s_client -connect " . $escapedHost . " -tls1 -CApath " . ROOT . "/config/ca-certs/ $arg 2>&1\n"); |
|
| 241 | + $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl']." s_client -connect ".$escapedHost." -tls1 -CApath ".ROOT."/config/ca-certs/ $arg 2>&1\n"); |
|
| 242 | 242 | $time_start = microtime(true); |
| 243 | 243 | $opensslbabble = []; |
| 244 | 244 | $result = 999; // likely to become zero by openssl; don't want to initialise to zero, could cover up exec failures |
| 245 | - exec(CONFIG['PATHS']['openssl'] . " s_client -connect " . $escapedHost . " -no_ssl3 -CApath " . ROOT . "/config/ca-certs/ $arg 2>&1", $opensslbabble, $result); |
|
| 245 | + exec(CONFIG['PATHS']['openssl']." s_client -connect ".$escapedHost." -no_ssl3 -CApath ".ROOT."/config/ca-certs/ $arg 2>&1", $opensslbabble, $result); |
|
| 246 | 246 | $time_stop = microtime(true); |
| 247 | 247 | $testresults['time_millisec'] = floor(($time_stop - $time_start) * 1000); |
| 248 | 248 | $testresults['returncode'] = $result; |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | they are from the same user group. You are not allowed to share them to an unlimited |
| 53 | 53 | audience (e.g. on a publicly accessible web server).</li> |
| 54 | 54 | <li>If You are an eduroam Identity Provider administrator, you are allowed to download and pass on the Installers to |
| 55 | -your own <?php echo CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'];?> end users, e.g. on the support web pages of your <?php echo CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'];?>, on Welcome Package CDs or USB sticks, etc.</li> |
|
| 55 | +your own <?php echo CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']; ?> end users, e.g. on the support web pages of your <?php echo CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']; ?>, on Welcome Package CDs or USB sticks, etc.</li> |
|
| 56 | 56 | <li>If You are a third-party not affiliated with eduroam, you are only allowed to download and pass on |
| 57 | 57 | the Metadata and/or the Installers after having received written permission by the eduroam Operations team.</li> |
| 58 | 58 | </ul> |
@@ -53,14 +53,14 @@ |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | switch ($_GET['token']) { |
| 56 | - case "SELF-REGISTER": |
|
| 57 | - $token = "SELF-REGISTER"; |
|
| 58 | - $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
|
| 59 | - $federation = CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration']; |
|
| 60 | - break; |
|
| 61 | - default: |
|
| 62 | - $token = $validator->token(filter_input(INPUT_GET,'token',FILTER_SANITIZE_STRING)); |
|
| 63 | - $checkval = $usermgmt->checkTokenValidity($token); |
|
| 56 | + case "SELF-REGISTER": |
|
| 57 | + $token = "SELF-REGISTER"; |
|
| 58 | + $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
|
| 59 | + $federation = CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration']; |
|
| 60 | + break; |
|
| 61 | + default: |
|
| 62 | + $token = $validator->token(filter_input(INPUT_GET,'token',FILTER_SANITIZE_STRING)); |
|
| 63 | + $checkval = $usermgmt->checkTokenValidity($token); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if ($checkval < 0) { |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | ?> |
| 31 | 31 | <?php |
| 32 | 32 | |
| 33 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 33 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 34 | 34 | |
| 35 | 35 | $auth = new \web\lib\admin\Authentication(); |
| 36 | 36 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -70,22 +70,22 @@ discard block |
||
| 70 | 70 | $federation = CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration']; |
| 71 | 71 | break; |
| 72 | 72 | default: |
| 73 | - $token = $validator->token(filter_input(INPUT_GET,'token',FILTER_SANITIZE_STRING)); |
|
| 73 | + $token = $validator->token(filter_input(INPUT_GET, 'token', FILTER_SANITIZE_STRING)); |
|
| 74 | 74 | $checkval = $usermgmt->checkTokenValidity($token); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | if ($checkval < 0) { |
| 78 | 78 | echo $deco->pageheader(_("Error creating new IdP binding!"), "ADMIN-IDP"); |
| 79 | - echo "<h1>" . _("Error creating new IdP binding!") . "</h1>"; |
|
| 79 | + echo "<h1>"._("Error creating new IdP binding!")."</h1>"; |
|
| 80 | 80 | switch ($checkval) { |
| 81 | 81 | case \core\UserManagement::TOKENSTATUS_FAIL_ALREADYCONSUMED: |
| 82 | - echo "<p>" . sprintf(_("Sorry... this token has already been used. The %s is already created. If you got the invitation from a mailing list, probably someone else used it before you."), $elements->nomenclatureInst) . "</p>"; |
|
| 82 | + echo "<p>".sprintf(_("Sorry... this token has already been used. The %s is already created. If you got the invitation from a mailing list, probably someone else used it before you."), $elements->nomenclatureInst)."</p>"; |
|
| 83 | 83 | break; |
| 84 | 84 | case \core\UserManagement::TOKENSTATUS_FAIL_EXPIRED: |
| 85 | - echo "<p>" . sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. The %s administrator can create a new one for you."), $elements->nomenclatureFed) . "</p>"; |
|
| 85 | + echo "<p>".sprintf(_("Sorry... this token has expired. Invitation tokens are valid for 24 hours. The %s administrator can create a new one for you."), $elements->nomenclatureFed)."</p>"; |
|
| 86 | 86 | break; |
| 87 | 87 | default: |
| 88 | - echo "<p>" . _("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.") . "</p>"; |
|
| 88 | + echo "<p>"._("Sorry... you have come to the enrollment page without a valid token. Are you a nasty person? If not, you should go to <a href='overview_user.php'>your profile page</a> instead.")."</p>"; |
|
| 89 | 89 | } |
| 90 | 90 | echo $deco->footer(); |
| 91 | 91 | throw new Exception("Terminating because something is wrong with the token we received."); |
@@ -100,12 +100,12 @@ discard block |
||
| 100 | 100 | case "SELF-REGISTER": |
| 101 | 101 | $fed = new \core\Federation($federation); |
| 102 | 102 | $newidp = new \core\IdP($fed->newIdP($user, "FED", "SELFSERVICE")); |
| 103 | - $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - selfservice registration"); |
|
| 103 | + $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - selfservice registration"); |
|
| 104 | 104 | break; |
| 105 | 105 | default: |
| 106 | 106 | $newidp = $usermgmt->createIdPFromToken($token, $user); |
| 107 | 107 | $usermgmt->invalidateToken($token); |
| 108 | - $loggerInstance->writeAudit($user, "MOD", "IdP " . $newidp->identifier . " - Token used and invalidated"); |
|
| 108 | + $loggerInstance->writeAudit($user, "MOD", "IdP ".$newidp->identifier." - Token used and invalidated"); |
|
| 109 | 109 | break; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -1019,12 +1019,12 @@ |
||
| 1019 | 1019 | $certUsernameLabel = WindowsCommon::sprint_nsi(_("Username:")); |
| 1020 | 1020 | $certUsernameLength = strlen($certUsernameLabel); |
| 1021 | 1021 | $labelLength = max($certPasswordLength,$certUsernameLength); |
| 1022 | - ?> |
|
| 1022 | + ?> |
|
| 1023 | 1023 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echo_nsi(_("Selected file: \$Cert_file"))?>" |
| 1024 | 1024 | !else |
| 1025 | 1025 | <?php $certPasswordLabel = WindowsCommon::sprint_nsi(_("import password:")); |
| 1026 | 1026 | $certPasswordLength = strlen($certPasswordLabel); |
| 1027 | - ?> |
|
| 1027 | + ?> |
|
| 1028 | 1028 | !insertmacro debug_cat 4 "Unpacking SB_cert.p12" |
| 1029 | 1029 | File "SB_cert.p12" |
| 1030 | 1030 | nsArray::Set Delete_files "SB_cert.p12" |
@@ -136,10 +136,10 @@ discard block |
||
| 136 | 136 | !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp" |
| 137 | 137 | !define MUI_COMPONENTSPAGE_SMALLDESC |
| 138 | 138 | |
| 139 | -!define WELCOME_HEADER "<?php printf(WindowsCommon::sprint_nsi(_("Welcome to the %s installer")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?>" |
|
| 140 | -!define FAREWELL_HEADER "<?php WindowsCommon::echo_nsi( _("Installation complete"))?>" |
|
| 141 | -!define FAREWELL_TEXT "<?php WindowsCommon::echo_nsi( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi( _("Your system is ready."))?>" |
|
| 142 | -!define FAREWELL_FAIL "<?php WindowsCommon::echo_nsi( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi( _("Please contact \${SUPPORT}."))?>" |
|
| 139 | +!define WELCOME_HEADER "<?php printf(WindowsCommon::sprint_nsi(_("Welcome to the %s installer")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?>" |
|
| 140 | +!define FAREWELL_HEADER "<?php WindowsCommon::echo_nsi(_("Installation complete"))?>" |
|
| 141 | +!define FAREWELL_TEXT "<?php WindowsCommon::echo_nsi(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(_("Your system is ready."))?>" |
|
| 142 | +!define FAREWELL_FAIL "<?php WindowsCommon::echo_nsi(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echo_nsi(_("Please contact \${SUPPORT}."))?>" |
|
| 143 | 143 | ;-------------------------------- |
| 144 | 144 | ;Languages |
| 145 | 145 | !insertmacro MUI_LANGUAGE "${LANG}" |
@@ -147,14 +147,14 @@ discard block |
||
| 147 | 147 | ;-------------------------------- |
| 148 | 148 | ; License file |
| 149 | 149 | !ifdef LICENSE_FILE |
| 150 | -LicenseForceSelection checkbox "<?php WindowsCommon::echo_nsi( _("Accept"))?>" |
|
| 150 | +LicenseForceSelection checkbox "<?php WindowsCommon::echo_nsi(_("Accept"))?>" |
|
| 151 | 151 | LicenseText "<?php WindowsCommon::echo_nsi(_("If you accept the conditions then select Accept and then click Install to continue."))?>" |
| 152 | 152 | LicenseData ${LICENSE_FILE} |
| 153 | 153 | !endif |
| 154 | 154 | |
| 155 | 155 | ;----------------------------------- |
| 156 | 156 | |
| 157 | -MiscButtonText "" "" "" "<?php WindowsCommon::echo_nsi( _("Finish"))?>" |
|
| 157 | +MiscButtonText "" "" "" "<?php WindowsCommon::echo_nsi(_("Finish"))?>" |
|
| 158 | 158 | ;---------------------------------- |
| 159 | 159 | ; FUNCTIONS |
| 160 | 160 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | !macro install_ca_cert ca_file ca_fingerprint level |
| 189 | 189 | !insertmacro debug_cat 2 "locating certificate SHA=${ca_fingerprint} Level=${level}" |
| 190 | - DetailPrint "<?php WindowsCommon::echo_nsi( _("searching for certificate"))?> ${ca_file}" |
|
| 190 | + DetailPrint "<?php WindowsCommon::echo_nsi(_("searching for certificate"))?> ${ca_file}" |
|
| 191 | 191 | File "${ca_file}" |
| 192 | 192 | nsArray::Set Delete_files "${ca_file}" |
| 193 | 193 | !insertmacro debug_cat 2 "Testing machine store root" |
@@ -249,13 +249,13 @@ discard block |
||
| 249 | 249 | ${EndIf} |
| 250 | 250 | !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}" |
| 251 | 251 | !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}" |
| 252 | - DetailPrint "<?php WindowsCommon::echo_nsi( _("installing certificate"))?> ${ca_file}" |
|
| 252 | + DetailPrint "<?php WindowsCommon::echo_nsi(_("installing certificate"))?> ${ca_file}" |
|
| 253 | 253 | nsExec::Exec '"certutil" -addstore -user ${level} "$TEMP"\${ca_file}' |
| 254 | 254 | Pop $0 |
| 255 | 255 | !insertmacro debug_cat 3 "certutil returned $0" |
| 256 | 256 | ${If} $0 != 0 |
| 257 | 257 | IfSilent +2 |
| 258 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("could not install certificate"))?> ${ca_file}" |
|
| 258 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("could not install certificate"))?> ${ca_file}" |
|
| 259 | 259 | !insertmacro debug_cat 1 "could not install certificate ${ca_file}" |
| 260 | 260 | ${EndIf} |
| 261 | 261 | no_install_${ca_file}: |
@@ -462,26 +462,26 @@ discard block |
||
| 462 | 462 | pop $R0 |
| 463 | 463 | ${If} $tkip_count > 0 |
| 464 | 464 | ${If} $aes_count > 1 |
| 465 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
| 465 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
| 466 | 466 | ${Else} |
| 467 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
| 467 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echo_nsi(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
| 468 | 468 | ${EndIf} |
| 469 | 469 | ${Else} |
| 470 | 470 | StrCpy $R1 "" |
| 471 | 471 | ${EndIf} |
| 472 | 472 | ${If} $profile_count > 0 |
| 473 | - StrCpy $welcome_message "<?php WindowsCommon::echo_nsi( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 474 | -<?php WindowsCommon::echo_nsi( _("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
| 473 | + StrCpy $welcome_message "<?php WindowsCommon::echo_nsi(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 474 | +<?php WindowsCommon::echo_nsi(_("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
| 475 | 475 | $R0.\ |
| 476 | 476 | $R1$\r$\n$\n\ |
| 477 | -<?php WindowsCommon::echo_nsi( _("More information and comments:"))?>$\r$\n\ |
|
| 477 | +<?php WindowsCommon::echo_nsi(_("More information and comments:"))?>$\r$\n\ |
|
| 478 | 478 | EMAIL: ${SUPPORT}$\r$\n\ |
| 479 | 479 | WWW: ${URL}" |
| 480 | 480 | ${Else} |
| 481 | -StrCpy $welcome_message "<?php WindowsCommon::echo_nsi( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 482 | -<?php WindowsCommon::echo_nsi( _("The installer will create the wireless profile:"))?> $R0.\ |
|
| 481 | +StrCpy $welcome_message "<?php WindowsCommon::echo_nsi(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
| 482 | +<?php WindowsCommon::echo_nsi(_("The installer will create the wireless profile:"))?> $R0.\ |
|
| 483 | 483 | $R1$\r$\n$\n\ |
| 484 | -<?php WindowsCommon::echo_nsi( _("More information and comments:"))?>$\r$\n\ |
|
| 484 | +<?php WindowsCommon::echo_nsi(_("More information and comments:"))?>$\r$\n\ |
|
| 485 | 485 | EMAIL: ${SUPPORT}$\r$\n\ |
| 486 | 486 | WWW: ${URL}" |
| 487 | 487 | ${EndIf} |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0 |
| 508 | 508 | ;TRANSLATION |
| 509 | 509 | nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\ |
| 510 | -$\r$\n$\r$\n<?php WindowsCommon::echo_nsi( _("Installer created with software from the GEANT project."))?>" |
|
| 510 | +$\r$\n$\r$\n<?php WindowsCommon::echo_nsi(_("Installer created with software from the GEANT project."))?>" |
|
| 511 | 511 | Pop $TEXT |
| 512 | 512 | |
| 513 | 513 | SetCtlColors $DIALOG "" 0xffffff |
@@ -640,18 +640,18 @@ discard block |
||
| 640 | 640 | ${If} $wireless_result == 1 |
| 641 | 641 | !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service" |
| 642 | 642 | IfSilent +2 |
| 643 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
| 643 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
| 644 | 644 | Call Cleanup |
| 645 | 645 | ${EndIf} |
| 646 | 646 | ${If} $wireless_result == 2 |
| 647 | 647 | IfSilent +2 |
| 648 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi( _("No wireless interfaces found. The installer cannot continue."))?>" |
|
| 648 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echo_nsi(_("No wireless interfaces found. The installer cannot continue."))?>" |
|
| 649 | 649 | Call Cleanup |
| 650 | 650 | ${EndIf} |
| 651 | 651 | ${Else} |
| 652 | 652 | ${If} $wireless_result > 0 |
| 653 | 653 | IfSilent +3 |
| 654 | - MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi( _("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes |
|
| 654 | + MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi(_("No wireless interfaces found. Wireless access will not be configured. Would you like to continue and configure access on the wired interface?"))?>" IDYES wired_yes |
|
| 655 | 655 | Call Cleanup |
| 656 | 656 | wired_yes: |
| 657 | 657 | Push 1 |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | ${If} $wired == 1 |
| 668 | 668 | ${If} $force_wired == 0 |
| 669 | 669 | IfSilent wired |
| 670 | - MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
| 670 | + MessageBox MB_YESNO "<?php WindowsCommon::echo_nsi(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
| 671 | 671 | Push 0 |
| 672 | 672 | Pop $wired |
| 673 | 673 | wired: |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | ;================================ |
| 709 | 709 | |
| 710 | 710 | Function ShowInstfiles |
| 711 | - !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi( _("Profiles installation"))?>" " " |
|
| 711 | + !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi(_("Profiles installation"))?>" " " |
|
| 712 | 712 | FunctionEnd |
| 713 | 713 | ;================================ |
| 714 | 714 | ; Check if a wireless profile exist and put it on delete list |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | |
| 728 | 728 | Function FindProfile |
| 729 | 729 | Pop $R8 |
| 730 | - DetailPrint "<?php WindowsCommon::echo_nsi( _("Checking for profile \$R8"))?>" |
|
| 730 | + DetailPrint "<?php WindowsCommon::echo_nsi(_("Checking for profile \$R8"))?>" |
|
| 731 | 731 | !insertmacro debug_cat 2 "Checking for profile $R8" |
| 732 | 732 | !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8" |
| 733 | 733 | nsExec::Exec '"$Netsh" wlan show profiles "$R8"' |
@@ -735,7 +735,7 @@ discard block |
||
| 735 | 735 | !insertmacro debug_cat 4 "netsh returned $0" |
| 736 | 736 | ${If} $0 == 0 |
| 737 | 737 | !insertmacro debug_cat 1 "found profile $R8" |
| 738 | - DetailPrint "<?php WindowsCommon::echo_nsi( _("found profile \$R8"))?>" |
|
| 738 | + DetailPrint "<?php WindowsCommon::echo_nsi(_("found profile \$R8"))?>" |
|
| 739 | 739 | Push 0 |
| 740 | 740 | ${Else} |
| 741 | 741 | !insertmacro debug_cat 1 "profile $R8 not found" |
@@ -830,7 +830,7 @@ discard block |
||
| 830 | 830 | ${If} $Symantec_installed != 0 |
| 831 | 831 | !insertmacro debug_cat 3 "Symantec problem" |
| 832 | 832 | IfSilent +2 |
| 833 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprint_nsi(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) ?>" |
|
| 833 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprint_nsi(_("Please READ this message it is IMPORTANT.$\\r$\\nInstallation problems may be due to the fact that Symantec Endpoint Protection is installed on your machine.$\\r$\\nWhile this is a well-known bug of the Symantec product, about which the installer can not do anything, there is a workaround.$\\r$\\nWhen you close this window the installer will exit and an explorer window will be started (it could appear underneath already opened windows). In this window you should see a script named inst_cat. Start it by double-clicking, It will install the profiles. You will need to login to %s with your username and password.")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) ?>" |
|
| 834 | 834 | Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"' |
| 835 | 835 | Quit |
| 836 | 836 | |
@@ -1121,7 +1121,7 @@ discard block |
||
| 1121 | 1121 | Function PFXCertificateSelect |
| 1122 | 1122 | !ifndef SILVERBULLET |
| 1123 | 1123 | ;TRANSLATION |
| 1124 | -!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprint_nsi(_("%s installer for")),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?> " "<?php WindowsCommon::echo_nsi(_("Install personal certificate"))?>" |
|
| 1124 | +!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprint_nsi(_("%s installer for")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])?> " "<?php WindowsCommon::echo_nsi(_("Install personal certificate"))?>" |
|
| 1125 | 1125 | ;TRANSLATION |
| 1126 | 1126 | IfSilent +2 |
| 1127 | 1127 | MessageBox MB_OK "<?php WindowsCommon::echo_nsi(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echo_nsi(_("Click OK to continue"))?> " |
@@ -1137,7 +1137,7 @@ discard block |
||
| 1137 | 1137 | $certPasswordLength = strlen($certPasswordLabel); |
| 1138 | 1138 | $certUsernameLabel = WindowsCommon::sprint_nsi(_("Username:")); |
| 1139 | 1139 | $certUsernameLength = strlen($certUsernameLabel); |
| 1140 | - $labelLength = max($certPasswordLength,$certUsernameLength); |
|
| 1140 | + $labelLength = max($certPasswordLength, $certUsernameLength); |
|
| 1141 | 1141 | ?> |
| 1142 | 1142 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echo_nsi(_("Selected file: \$Cert_file"))?>" |
| 1143 | 1143 | !else |
@@ -1154,11 +1154,11 @@ discard block |
||
| 1154 | 1154 | !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP"; |
| 1155 | 1155 | ${If} $VistaNoSP == 0 |
| 1156 | 1156 | !ifdef PFX_USERNAME |
| 1157 | - !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u" |
|
| 1158 | - !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u" |
|
| 1157 | + !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u" |
|
| 1158 | + !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u" |
|
| 1159 | 1159 | !else |
| 1160 | - !define LABEL_LENGTH "<?php echo($certPasswordLength*3.5)?>u" |
|
| 1161 | - !define TEXT_START "<?php echo($certPasswordLength*3.5 +5)?>u" |
|
| 1160 | + !define LABEL_LENGTH "<?php echo($certPasswordLength * 3.5)?>u" |
|
| 1161 | + !define TEXT_START "<?php echo($certPasswordLength * 3.5 + 5)?>u" |
|
| 1162 | 1162 | !endif |
| 1163 | 1163 | ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>" |
| 1164 | 1164 | ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u "" |
@@ -1530,7 +1530,7 @@ discard block |
||
| 1530 | 1530 | Section "-start" |
| 1531 | 1531 | SectionIn RO |
| 1532 | 1532 | |
| 1533 | -!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi( _("Installation"))?>" "<?php WindowsCommon::echo_nsi( _("Checking for existing wireless profiles"))?>" |
|
| 1533 | +!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echo_nsi(_("Installation"))?>" "<?php WindowsCommon::echo_nsi(_("Checking for existing wireless profiles"))?>" |
|
| 1534 | 1534 | !ifndef PWD |
| 1535 | 1535 | !include "certs.nsh" |
| 1536 | 1536 | !endif |
@@ -185,7 +185,6 @@ |
||
| 185 | 185 | * - RETVAL_NOTCONFIGURED; needs CONFIG_DIAGNOSTICS['RADIUSTESTS']['TLS-discoverytag'] |
| 186 | 186 | * - RETVAL_INVALID (at least one format error) |
| 187 | 187 | * - RETVAL_OK (all fine) |
| 188 | - |
|
| 189 | 188 | * @return int one of two RETVALs above |
| 190 | 189 | */ |
| 191 | 190 | public function relevantNAPTRcompliance() { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | namespace core\diag; |
| 23 | 23 | |
| 24 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
| 24 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * Test suite to verify that a given NAI realm has NAPTR records according to |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $this->NAPTR_executed = RADIUSTests::RETVAL_NOTCONFIGURED; |
| 170 | 170 | return RADIUSTests::RETVAL_NOTCONFIGURED; |
| 171 | 171 | } |
| 172 | - $NAPTRs = dns_get_record($this->realm . ".", DNS_NAPTR); |
|
| 172 | + $NAPTRs = dns_get_record($this->realm.".", DNS_NAPTR); |
|
| 173 | 173 | if ($NAPTRs === FALSE || count($NAPTRs) == 0) { |
| 174 | 174 | $this->NAPTR_executed = RFC7585Tests::RETVAL_NONAPTR; |
| 175 | 175 | return RFC7585Tests::RETVAL_NONAPTR; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * <base_url>/copyright.php after deploying the software |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -require_once __DIR__ . "/../core/Psr4Autoloader.php"; |
|
| 22 | +require_once __DIR__."/../core/Psr4Autoloader.php"; |
|
| 23 | 23 | use core\autoloader\Psr4Autoloader; |
| 24 | 24 | |
| 25 | 25 | // instantiate the loader |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | // register the base directories for the namespace prefix |
| 32 | 32 | // include CAT/core library |
| 33 | -$loader->addNamespace('core', __DIR__ . "/../core"); |
|
| 33 | +$loader->addNamespace('core', __DIR__."/../core"); |
|
| 34 | 34 | // include CAT/devices library |
| 35 | -$loader->addNamespace('devices', __DIR__ . "/../devices"); |
|
| 35 | +$loader->addNamespace('devices', __DIR__."/../devices"); |
|
| 36 | 36 | // include CAT/web library |
| 37 | -$loader->addNamespace('web', __DIR__ . "/../web"); |
|
| 37 | +$loader->addNamespace('web', __DIR__."/../web"); |
|
| 38 | 38 | |
| 39 | 39 | // include PHPMailer library |
| 40 | -$loader->addNamespace('PHPMailer\PHPMailer', __DIR__ . "/../core/PHPMailer/src"); |
|
| 40 | +$loader->addNamespace('PHPMailer\PHPMailer', __DIR__."/../core/PHPMailer/src"); |
|
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | require_once "autoloader.php"; |
| 23 | -require_once __DIR__ . "/../packageRoot.php"; |
|
| 23 | +require_once __DIR__."/../packageRoot.php"; |
|
| 24 | 24 | |
| 25 | 25 | /* This code block compares the template config against the actual one to find |
| 26 | 26 | * out which of the values are MISSING, which are still at DEFAULT and which |
@@ -88,12 +88,12 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | // this is the actual config |
| 90 | 90 | |
| 91 | -if (!file_exists(ROOT . "/config/config-master.php")) { |
|
| 91 | +if (!file_exists(ROOT."/config/config-master.php")) { |
|
| 92 | 92 | echo "Master configuration file not found. You need to configure the product! At least config-master.php is required!"; |
| 93 | 93 | throw new Exception("Master config file not found!"); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | -require ROOT . "/config/config-master.php"; |
|
| 96 | +require ROOT."/config/config-master.php"; |
|
| 97 | 97 | |
| 98 | 98 | /* as a test for the config comparison, run this, display in browser and exit |
| 99 | 99 | |
@@ -109,14 +109,14 @@ discard block |
||
| 109 | 109 | /* load sub-configs if we are dealing with those in this installation */ |
| 110 | 110 | |
| 111 | 111 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == 'LOCAL' || CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_RADIUS'] == 'LOCAL') { |
| 112 | - include ROOT . "/config/config-confassistant.php"; |
|
| 112 | + include ROOT."/config/config-confassistant.php"; |
|
| 113 | 113 | } else { // we want to define the constant itself anyway, to avoid some ugly warnings on the console |
| 114 | 114 | // this is done with an inline include |
| 115 | 115 | define("CONFIG_CONFASSISTANT", []); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['DIAGNOSTICS'] == 'LOCAL') { |
| 119 | - include ROOT . "/config/config-diagnostics.php"; |
|
| 119 | + include ROOT."/config/config-diagnostics.php"; |
|
| 120 | 120 | } else { // same here |
| 121 | 121 | define("CONFIG_DIAGNOSTICS", []); |
| 122 | 122 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | function CAT_session_start() { |
| 130 | 130 | if (session_status() != PHP_SESSION_ACTIVE) { |
| 131 | 131 | session_name("CAT"); |
| 132 | - session_set_cookie_params(0, "/", $_SERVER['SERVER_NAME'], (isset($_SERVER['HTTPS']) ? TRUE : FALSE )); |
|
| 132 | + session_set_cookie_params(0, "/", $_SERVER['SERVER_NAME'], (isset($_SERVER['HTTPS']) ? TRUE : FALSE)); |
|
| 133 | 133 | session_start(); |
| 134 | 134 | } |
| 135 | 135 | } |