@@ -1115,12 +1115,12 @@ |
||
1115 | 1115 | $certUsernameLabel = WindowsCommon::sprintNsis(_("Username:")); |
1116 | 1116 | $certUsernameLength = strlen($certUsernameLabel); |
1117 | 1117 | $labelLength = max($certPasswordLength,$certUsernameLength); |
1118 | - ?> |
|
1118 | + ?> |
|
1119 | 1119 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echoNsis(_("Selected file: \$Cert_file"))?>" |
1120 | 1120 | !else |
1121 | 1121 | <?php $certPasswordLabel = WindowsCommon::sprintNsis(_("import password:")); |
1122 | 1122 | $certPasswordLength = strlen($certPasswordLabel); |
1123 | - ?> |
|
1123 | + ?> |
|
1124 | 1124 | !insertmacro debug_cat 4 "Unpacking SB_cert.p12" |
1125 | 1125 | File "SB_cert.p12" |
1126 | 1126 | nsArray::Set Delete_files "SB_cert.p12" |
@@ -146,10 +146,10 @@ discard block |
||
146 | 146 | !define MUI_HEADERIMAGE_BITMAP "cat_150.bmp" |
147 | 147 | !define MUI_COMPONENTSPAGE_SMALLDESC |
148 | 148 | |
149 | -!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")),\config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
150 | -!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis( _("Installation complete"))?>" |
|
151 | -!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis( _("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Your system is ready."))?>" |
|
152 | -!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis( _("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis( _("Please contact \${SUPPORT}."))?>" |
|
149 | +!define WELCOME_HEADER "<?php printf(WindowsCommon::sprintNsis(_("Welcome to the %s installer")), \config\ConfAssistant::CONSORTIUM['display_name'])?>" |
|
150 | +!define FAREWELL_HEADER "<?php WindowsCommon::echoNsis(_("Installation complete"))?>" |
|
151 | +!define FAREWELL_TEXT "<?php WindowsCommon::echoNsis(_("Network profiles have been installed."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Your system is ready."))?>" |
|
152 | +!define FAREWELL_FAIL "<?php WindowsCommon::echoNsis(_("Network installation had errors."))?>$\r$\n$\n <?php WindowsCommon::echoNsis(_("Please contact \${SUPPORT}."))?>" |
|
153 | 153 | ;-------------------------------- |
154 | 154 | ;Languages |
155 | 155 | !insertmacro MUI_LANGUAGE "${LANG}" |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | ;-------------------------------- |
158 | 158 | ; Licence file |
159 | 159 | !ifdef LICENSE_FILE |
160 | -LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis( _("Accept"))?>" |
|
160 | +LicenseForceSelection checkbox "<?php WindowsCommon::echoNsis(_("Accept"))?>" |
|
161 | 161 | LicenseText "<?php WindowsCommon::echoNsis(_("If you accept the conditions then select Accept and then click Install to continue."))?>" |
162 | 162 | LicenseData ${LICENSE_FILE} |
163 | 163 | !endif |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | VIAddVersionKey "CompanyName" "GÉANT" |
171 | 171 | VIAddVersionKey "ProductVersion" "${VERSION}" |
172 | 172 | |
173 | -MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis( _("Finish"))?>" |
|
173 | +MiscButtonText "" "" "" "<?php WindowsCommon::echoNsis(_("Finish"))?>" |
|
174 | 174 | ;---------------------------------- |
175 | 175 | ; FUNCTIONS |
176 | 176 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | |
205 | 205 | !macro install_ca_cert ca_file ca_fingerprint level |
206 | 206 | !insertmacro debug_cat 2 "locating certificate SHA=${ca_fingerprint} Level=${level}" |
207 | - DetailPrint "<?php WindowsCommon::echoNsis( _("searching for certificate"))?> ${ca_file}" |
|
207 | + DetailPrint "<?php WindowsCommon::echoNsis(_("searching for certificate"))?> ${ca_file}" |
|
208 | 208 | File "${ca_file}" |
209 | 209 | nsArray::Set Delete_files "${ca_file}" |
210 | 210 | !insertmacro debug_cat 2 "Testing machine store root" |
@@ -266,13 +266,13 @@ discard block |
||
266 | 266 | ${EndIf} |
267 | 267 | !insertmacro debug_cat 2 "installing certificate $TEMP\${ca_file}" |
268 | 268 | !insertmacro debug_cat 3 "Execute: certutil -addstore -user ${level} $TEMP\${ca_file}" |
269 | - DetailPrint "<?php WindowsCommon::echoNsis( _("installing certificate"))?> ${ca_file}" |
|
269 | + DetailPrint "<?php WindowsCommon::echoNsis(_("installing certificate"))?> ${ca_file}" |
|
270 | 270 | nsExec::Exec '"certutil" -addstore -user ${level} "$TEMP"\${ca_file}' |
271 | 271 | Pop $0 |
272 | 272 | !insertmacro debug_cat 3 "certutil returned $0" |
273 | 273 | ${If} $0 != 0 |
274 | 274 | IfSilent +2 |
275 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("could not install certificate"))?> ${ca_file}" |
|
275 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("could not install certificate"))?> ${ca_file}" |
|
276 | 276 | !insertmacro debug_cat 1 "could not install certificate ${ca_file}" |
277 | 277 | ${EndIf} |
278 | 278 | no_install_${ca_file}: |
@@ -479,26 +479,26 @@ discard block |
||
479 | 479 | pop $R0 |
480 | 480 | ${If} $tkip_count > 0 |
481 | 481 | ${If} $aes_count > 1 |
482 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
482 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profiles are preferred. Always use them if you have a choice."))?>" |
|
483 | 483 | ${Else} |
484 | - StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis( _("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
484 | + StrCpy $R1 "$\r$\n$\n<?php WindowsCommon::echoNsis(_("The non TKIP profile is preferred. Always use it if you have a choice."))?>" |
|
485 | 485 | ${EndIf} |
486 | 486 | ${Else} |
487 | 487 | StrCpy $R1 "" |
488 | 488 | ${EndIf} |
489 | 489 | ${If} $profile_count > 0 |
490 | - StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
491 | -<?php WindowsCommon::echoNsis( _("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
490 | + StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
491 | +<?php WindowsCommon::echoNsis(_("The installer will create the following wireless profiles:"))?>$\r$\n\ |
|
492 | 492 | $R0.\ |
493 | 493 | $R1$\r$\n$\n\ |
494 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
494 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
495 | 495 | EMAIL: ${SUPPORT}$\r$\n\ |
496 | 496 | WWW: ${URL}" |
497 | 497 | ${Else} |
498 | -StrCpy $welcome_message "<?php WindowsCommon::echoNsis( _("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
499 | -<?php WindowsCommon::echoNsis( _("The installer will create the wireless profile:"))?> $R0.\ |
|
498 | +StrCpy $welcome_message "<?php WindowsCommon::echoNsis(_("This installer has been prepared for \${ORGANISATION}"))?>.$\r$\n\ |
|
499 | +<?php WindowsCommon::echoNsis(_("The installer will create the wireless profile:"))?> $R0.\ |
|
500 | 500 | $R1$\r$\n$\n\ |
501 | -<?php WindowsCommon::echoNsis( _("More information and comments:"))?>$\r$\n\ |
|
501 | +<?php WindowsCommon::echoNsis(_("More information and comments:"))?>$\r$\n\ |
|
502 | 502 | EMAIL: ${SUPPORT}$\r$\n\ |
503 | 503 | WWW: ${URL}" |
504 | 504 | ${EndIf} |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0 |
525 | 525 | ;TRANSLATION |
526 | 526 | nsDialogs::CreateControl STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 46u -130u -32u "$welcome_message\ |
527 | -$\r$\n$\r$\n<?php WindowsCommon::echoNsis( _("Installer created with software from the GEANT project."))?>" |
|
527 | +$\r$\n$\r$\n<?php WindowsCommon::echoNsis(_("Installer created with software from the GEANT project."))?>" |
|
528 | 528 | Pop $TEXT |
529 | 529 | |
530 | 530 | SetCtlColors $DIALOG "" 0xffffff |
@@ -661,18 +661,18 @@ discard block |
||
661 | 661 | ${If} $wireless_result == 1 |
662 | 662 | !insertmacro debug_cat 1 "wlan_test.exe did not find wireless configuration service" |
663 | 663 | IfSilent +2 |
664 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
664 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("Windows wireless configuration service is not enabled. The installer cannot continue."))?>" |
|
665 | 665 | Call Cleanup |
666 | 666 | ${EndIf} |
667 | 667 | ${If} $wireless_result == 2 |
668 | 668 | IfSilent +2 |
669 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis( _("No wireless interfaces found. The installer cannot continue."))?>" |
|
669 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php WindowsCommon::echoNsis(_("No wireless interfaces found. The installer cannot continue."))?>" |
|
670 | 670 | Call Cleanup |
671 | 671 | ${EndIf} |
672 | 672 | ${Else} |
673 | 673 | ${If} $wireless_result > 0 |
674 | 674 | IfSilent +3 |
675 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("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 |
|
675 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("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 |
|
676 | 676 | Call Cleanup |
677 | 677 | wired_yes: |
678 | 678 | Push 1 |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | ${If} $wired == 1 |
689 | 689 | ${If} $force_wired == 0 |
690 | 690 | IfSilent wired |
691 | - MessageBox MB_YESNO "<?php WindowsCommon::echoNsis( _("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
691 | + MessageBox MB_YESNO "<?php WindowsCommon::echoNsis(_("Do you want to enable access on wired interfaces?"))?>" IDYES wired |
|
692 | 692 | Push 0 |
693 | 693 | Pop $wired |
694 | 694 | wired: |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | ;================================ |
730 | 730 | |
731 | 731 | Function ShowInstfiles |
732 | - !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Profiles installation"))?>" " " |
|
732 | + !insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Profiles installation"))?>" " " |
|
733 | 733 | FunctionEnd |
734 | 734 | ;================================ |
735 | 735 | ; Check if a wireless profile exist and put it on delete list |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | |
749 | 749 | Function FindProfile |
750 | 750 | Pop $R8 |
751 | - DetailPrint "<?php WindowsCommon::echoNsis( _("Checking for profile \$R8"))?>" |
|
751 | + DetailPrint "<?php WindowsCommon::echoNsis(_("Checking for profile \$R8"))?>" |
|
752 | 752 | !insertmacro debug_cat 2 "Checking for profile $R8" |
753 | 753 | !insertmacro debug_cat 3 "Exec: $Netsh wlan show profiles $R8" |
754 | 754 | nsExec::Exec '"$Netsh" wlan show profiles "$R8"' |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | !insertmacro debug_cat 4 "netsh returned $0" |
757 | 757 | ${If} $0 == 0 |
758 | 758 | !insertmacro debug_cat 1 "found profile $R8" |
759 | - DetailPrint "<?php WindowsCommon::echoNsis( _("found profile \$R8"))?>" |
|
759 | + DetailPrint "<?php WindowsCommon::echoNsis(_("found profile \$R8"))?>" |
|
760 | 760 | Push 0 |
761 | 761 | ${Else} |
762 | 762 | !insertmacro debug_cat 1 "profile $R8 not found" |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | ${If} $Symantec_installed != 0 |
854 | 854 | !insertmacro debug_cat 3 "Symantec problem" |
855 | 855 | IfSilent +2 |
856 | - MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("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']) ?>" |
|
856 | + MessageBox MB_OK|MB_ICONEXCLAMATION "<?php printf(WindowsCommon::sprintNsis(_("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']) ?>" |
|
857 | 857 | Exec '"explorer" /select,"$EXEDIR\inst_cat.cmd"' |
858 | 858 | Quit |
859 | 859 | |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | Function PFXCertificateSelect |
1187 | 1187 | !ifndef SILVERBULLET |
1188 | 1188 | ;TRANSLATION |
1189 | -!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")),\config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
1189 | +!insertmacro MUI_HEADER_TEXT "<?php printf(WindowsCommon::sprintNsis(_("%s installer for")), \config\ConfAssistant::CONSORTIUM['display_name'])?> " "<?php WindowsCommon::echoNsis(_("Install personal certificate"))?>" |
|
1190 | 1190 | ;TRANSLATION |
1191 | 1191 | IfSilent +2 |
1192 | 1192 | MessageBox MB_OK "<?php WindowsCommon::echoNsis(_("Preparing to install personal certificate."))?>$\r$\n<?php WindowsCommon::echoNsis(_("Click OK to continue"))?> " |
@@ -1202,7 +1202,7 @@ discard block |
||
1202 | 1202 | $certPasswordLength = strlen($certPasswordLabel); |
1203 | 1203 | $certUsernameLabel = WindowsCommon::sprintNsis(_("Username:")); |
1204 | 1204 | $certUsernameLength = strlen($certUsernameLabel); |
1205 | - $labelLength = max($certPasswordLength,$certUsernameLength); |
|
1205 | + $labelLength = max($certPasswordLength, $certUsernameLength); |
|
1206 | 1206 | ?> |
1207 | 1207 | ${NSD_CreateLabel} 0 0 100% 32u "<?php WindowsCommon::echoNsis(_("Selected file: \$Cert_file"))?>" |
1208 | 1208 | !else |
@@ -1219,11 +1219,11 @@ discard block |
||
1219 | 1219 | !insertmacro debug_cat 3 "Vista level (Vista without Service pack): $VistaNoSP"; |
1220 | 1220 | ${If} $VistaNoSP == 0 |
1221 | 1221 | !ifdef PFX_USERNAME |
1222 | - !define LABEL_LENGTH "<?php echo($labelLength*3.5)?>u" |
|
1223 | - !define TEXT_START "<?php echo($labelLength*3.5 +5)?>u" |
|
1222 | + !define LABEL_LENGTH "<?php echo($labelLength * 3.5)?>u" |
|
1223 | + !define TEXT_START "<?php echo($labelLength * 3.5 + 5)?>u" |
|
1224 | 1224 | !else |
1225 | - !define LABEL_LENGTH "<?php echo($certPasswordLength*3.5)?>u" |
|
1226 | - !define TEXT_START "<?php echo($certPasswordLength*3.5 +5)?>u" |
|
1225 | + !define LABEL_LENGTH "<?php echo($certPasswordLength * 3.5)?>u" |
|
1226 | + !define TEXT_START "<?php echo($certPasswordLength * 3.5 + 5)?>u" |
|
1227 | 1227 | !endif |
1228 | 1228 | ${NSD_CreateLabel} 0 35u ${LABEL_LENGTH} 12u "<?php echo $certPasswordLabel?>" |
1229 | 1229 | ${NSD_CreatePassword} ${TEXT_START} 34.5u 120u 12u "" |
@@ -1595,7 +1595,7 @@ discard block |
||
1595 | 1595 | Section "-start" |
1596 | 1596 | SectionIn RO |
1597 | 1597 | |
1598 | -!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis( _("Installation"))?>" "<?php WindowsCommon::echoNsis( _("Checking for existing wireless profiles"))?>" |
|
1598 | +!insertmacro MUI_HEADER_TEXT "<?php WindowsCommon::echoNsis(_("Installation"))?>" "<?php WindowsCommon::echoNsis(_("Checking for existing wireless profiles"))?>" |
|
1599 | 1599 | !ifndef PWD |
1600 | 1600 | !include "certs.nsh" |
1601 | 1601 | !endif |
@@ -88,24 +88,24 @@ discard block |
||
88 | 88 | $reqAuthenticator = random_bytes(16); |
89 | 89 | $packetIdentifier = random_bytes(1); |
90 | 90 | // construct Status-Server packet |
91 | - $prePacket = RFC5997Tests::PACKET_TYPE_STATUS_SERVER . |
|
92 | - $packetIdentifier . |
|
93 | - RFC5997Tests::PACKET_LENGTH . |
|
94 | - $reqAuthenticator . |
|
95 | - RFC5997Tests::ATTRIBUTE_NAS_IDENTIFIER . |
|
96 | - RFC5997Tests::LENGTH_NAS_IDENTIFIER . |
|
91 | + $prePacket = RFC5997Tests::PACKET_TYPE_STATUS_SERVER. |
|
92 | + $packetIdentifier. |
|
93 | + RFC5997Tests::PACKET_LENGTH. |
|
94 | + $reqAuthenticator. |
|
95 | + RFC5997Tests::ATTRIBUTE_NAS_IDENTIFIER. |
|
96 | + RFC5997Tests::LENGTH_NAS_IDENTIFIER. |
|
97 | 97 | RFC5997Tests::VALUE_NAS_IDENTIFIER; |
98 | - $sigPacket = $prePacket . |
|
99 | - RFC5997Tests::ATTRIBUTE_MESSAGE_AUTHENTICATOR . |
|
100 | - RFC5997Tests::LENGTH_MESSAGE_AUTHENTICATOR . |
|
98 | + $sigPacket = $prePacket. |
|
99 | + RFC5997Tests::ATTRIBUTE_MESSAGE_AUTHENTICATOR. |
|
100 | + RFC5997Tests::LENGTH_MESSAGE_AUTHENTICATOR. |
|
101 | 101 | "\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0"; |
102 | - $authPacket = $prePacket . |
|
103 | - RFC5997Tests::ATTRIBUTE_MESSAGE_AUTHENTICATOR . |
|
104 | - RFC5997Tests::LENGTH_MESSAGE_AUTHENTICATOR . |
|
102 | + $authPacket = $prePacket. |
|
103 | + RFC5997Tests::ATTRIBUTE_MESSAGE_AUTHENTICATOR. |
|
104 | + RFC5997Tests::LENGTH_MESSAGE_AUTHENTICATOR. |
|
105 | 105 | hash_hmac("md5", $sigPacket, $this->secret, TRUE); |
106 | 106 | $connectErrorNumber = 0; |
107 | 107 | $connectErrorString = ""; |
108 | - $netHandle = fsockopen("udp://" . $this->ipAddr, $this->port, $connectErrorNumber, $connectErrorString, RFC5997Tests::CONNECTION_TIMEOUT); |
|
108 | + $netHandle = fsockopen("udp://".$this->ipAddr, $this->port, $connectErrorNumber, $connectErrorString, RFC5997Tests::CONNECTION_TIMEOUT); |
|
109 | 109 | if ($netHandle === FALSE) { |
110 | 110 | throw new Exception("Unable to establish UDP socket resource. Error number was $connectErrorNumber, '$connectErrorString'"); |
111 | 111 | } |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | return AbstractTest::RETVAL_INVALID; |
124 | 124 | } |
125 | 125 | // check the response authenticator to prevent spoofing. |
126 | - $sigResponse = RFC5997Tests::PACKET_TYPE_ACCESS_ACCEPT . |
|
127 | - $packetIdentifier . |
|
128 | - $read[2] . $read[3] . |
|
129 | - $reqAuthenticator . |
|
130 | - substr($read, 20) . |
|
126 | + $sigResponse = RFC5997Tests::PACKET_TYPE_ACCESS_ACCEPT. |
|
127 | + $packetIdentifier. |
|
128 | + $read[2].$read[3]. |
|
129 | + $reqAuthenticator. |
|
130 | + substr($read, 20). |
|
131 | 131 | $this->secret; |
132 | 132 | $expected = hash("md5", $sigResponse, TRUE); |
133 | 133 | if ($expected != substr($read, 4, 16)) { |
@@ -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 | \core\CAT::sessionStart(); |
24 | 24 | $loggerInstance = new \core\common\Logging(); |
25 | 25 | $loggerInstance->debug(4, "Sociopath test\n"); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | return NULL; |
34 | 34 | } |
35 | 35 | $loggerInstance->debug(4, $_SESSION['EVIDENCE']['QUESTIONSASKED']); |
36 | - $loggerInstance->debug(4, "\nAnswer question " . $QNUM . "\n"); |
|
36 | + $loggerInstance->debug(4, "\nAnswer question ".$QNUM."\n"); |
|
37 | 37 | switch ($answer) { |
38 | 38 | case 1: |
39 | 39 | $loggerInstance->debug(4, "Revaluate with FALSE"); |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | \core\CAT::sessionStart(); |
25 | 25 |
@@ -121,7 +121,7 @@ |
||
121 | 121 | if ($trailerPosition !== FALSE) { |
122 | 122 | $base = substr($scriptself, 0, $trailerPosition); |
123 | 123 | if ($base !== FALSE) { |
124 | - $url = "//$servername" . $base . "/logout_check.php"; |
|
124 | + $url = "//$servername".$base."/logout_check.php"; |
|
125 | 125 | } |
126 | 126 | } |
127 | 127 |
@@ -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,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | // register the base directories for the namespace prefix |
32 | 32 | // include configuration |
33 | -$loader->addNamespace('config', __DIR__ ); |
|
33 | +$loader->addNamespace('config', __DIR__); |
|
34 | 34 | // include CAT/core library |
35 | -$loader->addNamespace('core', __DIR__ . "/../core"); |
|
35 | +$loader->addNamespace('core', __DIR__."/../core"); |
|
36 | 36 | // include CAT/devices library |
37 | -$loader->addNamespace('devices', __DIR__ . "/../devices"); |
|
37 | +$loader->addNamespace('devices', __DIR__."/../devices"); |
|
38 | 38 | // include CAT/web library |
39 | -$loader->addNamespace('web', __DIR__ . "/../web"); |
|
40 | 39 | \ No newline at end of file |
40 | +$loader->addNamespace('web', __DIR__."/../web"); |
|
41 | 41 | \ No newline at end of file |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | exec("openssl ocsp -reqin $derFilePath -req_text", $output, $retval); |
98 | 98 | |
99 | 99 | if ($retval !== 0) { |
100 | - throw new Exception("openssl ocsp returned a non-zero return code. The DER data is probably bogus. B64 representation of DER data is: " . base64_encode($ocspRequestDer)); |
|
100 | + throw new Exception("openssl ocsp returned a non-zero return code. The DER data is probably bogus. B64 representation of DER data is: ".base64_encode($ocspRequestDer)); |
|
101 | 101 | } |
102 | 102 | if ($output === NULL) { // this can't really happen, but makes Scrutinizer happier |
103 | 103 | $output = []; |
@@ -127,14 +127,14 @@ discard block |
||
127 | 127 | * back (if we have it). |
128 | 128 | */ |
129 | 129 | if (strcasecmp($nameHash, OUR_NAME_HASH) != 0 || strcasecmp($keyHash, OUR_KEY_HASH) != 0) { |
130 | - throw new Exception("The request is about a different Issuer name / public key. Expected vs. actual name hash: " . OUR_NAME_HASH . " / $nameHash, " . OUR_KEY_HASH . " / $keyHash"); |
|
130 | + throw new Exception("The request is about a different Issuer name / public key. Expected vs. actual name hash: ".OUR_NAME_HASH." / $nameHash, ".OUR_KEY_HASH." / $keyHash"); |
|
131 | 131 | } |
132 | -error_log("base64-encoded request: " . base64_encode($ocspRequestDer)); |
|
132 | +error_log("base64-encoded request: ".base64_encode($ocspRequestDer)); |
|
133 | 133 | |
134 | -$response = fopen(__DIR__ . "/statements/" . $serialHex . ".der", "r"); |
|
134 | +$response = fopen(__DIR__."/statements/".$serialHex.".der", "r"); |
|
135 | 135 | if ($response === FALSE) { // not found |
136 | 136 | // first lets load the unauthorised response, which is the default reply |
137 | - $unauthResponse = fopen(__DIR__ . "/statements/UNAUTHORIZED.der", "r"); |
|
137 | + $unauthResponse = fopen(__DIR__."/statements/UNAUTHORIZED.der", "r"); |
|
138 | 138 | if ($unauthResponse === FALSE) { |
139 | 139 | throw new Exception("Unable to open our canned UNAUTHORIZED response!"); |
140 | 140 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | $responseContent = fread($response, 1000000); |
178 | 178 | fclose($response); |
179 | -error_log("base64-encoded response: " . base64_encode($responseContent)); |
|
179 | +error_log("base64-encoded response: ".base64_encode($responseContent)); |
|
180 | 180 | header('Content-Type: application/ocsp-response'); |
181 | -header('Content-Length: ' . strlen($responseContent)); |
|
181 | +header('Content-Length: '.strlen($responseContent)); |
|
182 | 182 | echo $responseContent; |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $this->activationsTotal = $invitationRow->quantity; |
146 | 146 | $certificatesResult = $this->databaseHandle->exec("SELECT `serial_number`, `ca_type` FROM `silverbullet_certificate` WHERE `silverbullet_invitation_id` = ? ORDER BY `revocation_status`, `expiry` DESC", "i", $this->identifier); |
147 | 147 | $certificatesNumber = ($certificatesResult ? $certificatesResult->num_rows : 0); |
148 | - $this->loggerInstance->debug(5, "At token validation level, " . $certificatesNumber . " certificates exist.\n"); |
|
148 | + $this->loggerInstance->debug(5, "At token validation level, ".$certificatesNumber." certificates exist.\n"); |
|
149 | 149 | // SELECT -> resource, no boolean |
150 | 150 | while ($runner = mysqli_fetch_object(/** @scrutinizer ignore-type */ $certificatesResult)) { |
151 | 151 | $this->associatedCertificates[] = new \core\SilverbulletCertificate($runner->serial_number, $runner->ca_type); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | throw new Exception("Uh. Something went seriously wrong with URL path mangling."); |
205 | 205 | } |
206 | 206 | } |
207 | - $link = $link . $relPath; |
|
207 | + $link = $link.$relPath; |
|
208 | 208 | |
209 | 209 | if (preg_match('/admin$/', $link)) { |
210 | 210 | $link = substr($link, 0, -6); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | } |
214 | 214 | } |
215 | 215 | |
216 | - return $link . '/accountstatus/accountstatus.php?token=' . $this->invitationTokenString; |
|
216 | + return $link.'/accountstatus/accountstatus.php?token='.$this->invitationTokenString; |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | $text .= sprintf(_("A new %s access credential has been created for you by your network administrator."), \config\ConfAssistant::CONSORTIUM['display_name']); |
241 | 241 | $text .= " "; |
242 | 242 | $text .= sprintf(_("Please follow the following link with the device you want to enable for %s to get a custom %s installation program just for you. You can click on the link, copy and paste it into a browser or scan the attached QR code."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
243 | - $text .= "\n\n" . $this->link() . "\n\n"; // gets replaced with the token value by getBody() |
|
243 | + $text .= "\n\n".$this->link()."\n\n"; // gets replaced with the token value by getBody() |
|
244 | 244 | $text .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."), \config\ConfAssistant::CONSORTIUM['display_name'], \config\ConfAssistant::CONSORTIUM['display_name']); |
245 | 245 | $text .= "\n\n"; |
246 | 246 | $text .= _("Regards,"); |
@@ -42,8 +42,8 @@ |
||
42 | 42 | $auth->authenticate(); |
43 | 43 | } |
44 | 44 | if (isset($_SESSION['admin_diag_auth'])) { |
45 | - $admin = 1; |
|
46 | - unset($_SESSION['admin_diag_auth']); |
|
45 | + $admin = 1; |
|
46 | + unset($_SESSION['admin_diag_auth']); |
|
47 | 47 | } |
48 | 48 | $Gui = new \web\lib\user\Gui(); |
49 | 49 | $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::APPEARANCE['skins'][0]); |
@@ -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(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | $admin = filter_input(INPUT_GET, 'admin', FILTER_VALIDATE_INT); |
24 | 24 | $sp = filter_input(INPUT_GET, 'sp', FILTER_VALIDATE_INT); |
25 | 25 | $givenRealm = htmlspecialchars(strip_tags(filter_input(INPUT_GET, 'realm'))); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | unset($q_el[$idx]); |
36 | 36 | $q_r = preg_replace("/\?.*/", "", $_SERVER['REQUEST_URI']); |
37 | 37 | if (count($q_el)) { |
38 | - $q_r = $q_r . '?' . implode('&', $q_el); |
|
38 | + $q_r = $q_r.'?'.implode('&', $q_el); |
|
39 | 39 | } |
40 | 40 | $_SERVER['REQUEST_URI'] = $q_r; |
41 | 41 | } |
@@ -44,11 +44,11 @@ discard block |
||
44 | 44 | $auth->authenticate(); |
45 | 45 | } |
46 | 46 | if (isset($_SESSION['admin_diag_auth'])) { |
47 | - $admin = 1; |
|
47 | + $admin = 1; |
|
48 | 48 | unset($_SESSION['admin_diag_auth']); |
49 | 49 | } |
50 | 50 | $Gui = new \web\lib\user\Gui(); |
51 | 51 | $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? \config\Master::APPEARANCE['skins'][0]); |
52 | -require "../skins/" . $skinObject->skin . "/diag/diag.php"; |
|
52 | +require "../skins/".$skinObject->skin."/diag/diag.php"; |
|
53 | 53 | |
54 | 54 |