@@ -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 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $inst_name = $my_inst->name; |
40 | 40 | |
41 | 41 | if ($wizardStyle) { |
42 | - echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant)); |
|
42 | + echo $deco->defaultPagePrelude(sprintf(_("%s: %s enrollment wizard (step 2)"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant)); |
|
43 | 43 | } else { |
44 | 44 | echo $deco->defaultPagePrelude(sprintf(_("%s: Editing %s '%s'"), \config\Master::APPEARANCE['productname'], $uiElements->nomenclatureParticipant, $inst_name)); |
45 | 45 | } |
@@ -80,13 +80,13 @@ discard block |
||
80 | 80 | ?> |
81 | 81 | </h1> |
82 | 82 | <div class='infobox'> |
83 | - <h2><?php $tablecaption = sprintf(_("%s general properties"), $uiElements->nomenclatureParticipant); echo $tablecaption;?></h2> |
|
83 | + <h2><?php $tablecaption = sprintf(_("%s general properties"), $uiElements->nomenclatureParticipant); echo $tablecaption; ?></h2> |
|
84 | 84 | <table> |
85 | - <caption><?php echo $tablecaption;?></caption> |
|
85 | + <caption><?php echo $tablecaption; ?></caption> |
|
86 | 86 | <tr> |
87 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
88 | - <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th> |
|
89 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
87 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
88 | + <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th> |
|
89 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
90 | 90 | </tr> |
91 | 91 | |
92 | 92 | <tr> |
@@ -101,12 +101,12 @@ discard block |
||
101 | 101 | </table> |
102 | 102 | </div> |
103 | 103 | <?php |
104 | - echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier" . ($wizardStyle ? "&wizard=true" : "") . "' method='post' accept-charset='UTF-8'> |
|
105 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
104 | + echo "<form enctype='multipart/form-data' action='edit_participant_result.php?inst_id=$my_inst->identifier".($wizardStyle ? "&wizard=true" : "")."' method='post' accept-charset='UTF-8'> |
|
105 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
106 | 106 | |
107 | 107 | if ($wizardStyle) { |
108 | - echo "<p>" . |
|
109 | - sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant) . "</p>"; |
|
108 | + echo "<p>". |
|
109 | + sprintf(_("Hello, newcomer. The %s is new to us. This wizard will ask you several questions about it, so that we can generate beautiful profiles for you in the end. All of the information below is optional, but it is important to fill out as many fields as possible for the benefit of your end users."), $uiElements->nomenclatureParticipant)."</p>"; |
|
110 | 110 | } |
111 | 111 | $optionDisplay = new web\lib\admin\OptionDisplay($idpoptions, \core\Options::LEVEL_IDP); |
112 | 112 | ?> |
@@ -114,11 +114,11 @@ discard block |
||
114 | 114 | <legend><strong><?php echo _("General Information"); ?></strong></legend> |
115 | 115 | <?php |
116 | 116 | if ($wizardStyle) { |
117 | - echo "<p>" . |
|
118 | - _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:") . "</p> |
|
117 | + echo "<p>". |
|
118 | + _("Some properties are valid across all deployment profiles. This is the place where you can describe those properties in a fine-grained way. The solicited information is used as follows:")."</p> |
|
119 | 119 | <ul> |
120 | - <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).") . "</li> |
|
121 | - <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."),$uiElements->nomenclatureParticipant) . "</li>"; |
|
120 | + <li>" . _("<strong>Logo</strong>: When you submit a logo, we will embed this logo into all installers where a custom logo is possible. We accept any image format, but for best results, we suggest SVG. If you don't upload a logo, we will use the generic logo instead (see top-right corner of this page).")."</li> |
|
121 | + <li>" . sprintf(_("<strong>Name</strong>: The %s may have names in multiple languages. It is recommended to always populate at least the 'default/other' language, as it is used as a fallback if the system does not have a name in the exact language the user requests a download in."), $uiElements->nomenclatureParticipant)."</li>"; |
|
122 | 122 | echo "</ul>"; |
123 | 123 | } |
124 | 124 | echo $optionDisplay->prefilledOptionTable("general", $my_inst->federation); |
@@ -132,44 +132,44 @@ discard block |
||
132 | 132 | <legend><strong><?php echo _("Media Properties"); ?></strong></legend> |
133 | 133 | <?php |
134 | 134 | if ($wizardStyle) { |
135 | - echo "<p>" . |
|
136 | - sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name']) . "</p> |
|
135 | + echo "<p>". |
|
136 | + sprintf(_("In this section, you define on which media %s should be configured on user devices."), \config\ConfAssistant::CONSORTIUM['display_name'])."</p> |
|
137 | 137 | <ul>"; |
138 | 138 | echo "<li>"; |
139 | - echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:")) . " </strong>"; |
|
139 | + echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional SSIDs:") : _("SSIDs:"))." </strong>"; |
|
140 | 140 | if (count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0) { |
141 | 141 | $ssidlist = ""; |
142 | 142 | foreach (\config\ConfAssistant::CONSORTIUM['ssid'] as $ssid) { |
143 | - $ssidlist .= ", '<strong>" . $ssid . "</strong>'"; |
|
143 | + $ssidlist .= ", '<strong>".$ssid."</strong>'"; |
|
144 | 144 | } |
145 | 145 | $ssidlist = substr($ssidlist, 2); |
146 | 146 | echo sprintf(ngettext("We will always configure this SSID for WPA2/AES: %s.", "We will always configure these SSIDs for WPA2/AES: %s.", count(\config\ConfAssistant::CONSORTIUM['ssid'])), $ssidlist); |
147 | - echo "<br/>" . sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID")); |
|
147 | + echo "<br/>".sprintf(_("It is also possible to define custom additional SSIDs with the option '%s' below."), $uiElements->displayName("media:SSID")); |
|
148 | 148 | } else { |
149 | 149 | echo _("Please configure which SSIDs should be configured in the installers."); |
150 | 150 | } |
151 | - echo " " . _("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible."); |
|
151 | + echo " "._("By default, we will only configure the SSIDs with WPA2/AES encryption. By using the '(with WPA/TKIP)' option you can specify that we should include legacy support for WPA/TKIP where possible."); |
|
152 | 152 | echo "</li>"; |
153 | 153 | |
154 | 154 | echo "<li>"; |
155 | - echo "<strong>" . ( count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:")) . " </strong>"; |
|
155 | + echo "<strong>".(count(\config\ConfAssistant::CONSORTIUM['ssid']) > 0 ? _("Additional Hotspot 2.0 / Passpoint Consortia:") : _("Hotspot 2.0 / Passpoint Consortia:"))." </strong>"; |
|
156 | 156 | if (count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi']) > 0) { |
157 | 157 | $consortiumlist = ""; |
158 | 158 | foreach (\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'] as $oi) { |
159 | - $consortiumlist .= ", '<strong>" . $oi . "</strong>'"; |
|
159 | + $consortiumlist .= ", '<strong>".$oi."</strong>'"; |
|
160 | 160 | } |
161 | 161 | $consortiumlist = substr($consortiumlist, 2); |
162 | 162 | echo sprintf(ngettext("We will always configure this Consortium OI: %s.", "We will always configure these Consortium OIs: %s.", count(\config\ConfAssistant::CONSORTIUM['interworking-consortium-oi'])), $consortiumlist); |
163 | 163 | |
164 | - echo "<br/>" . sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI")); |
|
164 | + echo "<br/>".sprintf(_("It is also possible to define custom additional OIs with the option '%s' below."), $uiElements->displayName("media:consortium_OI")); |
|
165 | 165 | } else { |
166 | 166 | echo _("Please configure which Consortium OIs should be configured in the installers."); |
167 | 167 | } |
168 | 168 | echo "</li>"; |
169 | - echo "<li><strong>" . _("Support for wired IEEE 802.1X:") . " </strong>" |
|
170 | - . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail).") . |
|
169 | + echo "<li><strong>"._("Support for wired IEEE 802.1X:")." </strong>" |
|
170 | + . _("If you want to configure your users' devices with IEEE 802.1X support for wired ethernet, please check the corresponding box. Note that this makes the installation process a bit more difficult on some platforms (Windows: needs administrator privileges; Apple: attempting to install a profile with wired support on a device without an active wired ethernet card will fail)."). |
|
171 | 171 | "</li>"; |
172 | - echo "<li><strong>" . _("Removal of bootstrap/onboarding SSIDs:") . " </strong>" |
|
172 | + echo "<li><strong>"._("Removal of bootstrap/onboarding SSIDs:")." </strong>" |
|
173 | 173 | . _("If you use a captive portal to distribute configurations, you may want to unconfigure/disable that SSID after the bootstrap process. With this option, the SSID will either be removed, or be defined as 'Only connect manually'.") |
174 | 174 | . "</li>"; |
175 | 175 | echo "</ul>"; |
@@ -185,16 +185,16 @@ discard block |
||
185 | 185 | echo "<p>"._("This section can be used to upload specific Terms of Use for your users and to display details of how your users can reach your local helpdesk.")."</p>"; |
186 | 186 | |
187 | 187 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == "LOCAL") { |
188 | - echo "<p>" . |
|
188 | + echo "<p>". |
|
189 | 189 | |
190 | - sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."),$uiElements->nomenclatureParticipant) . "</p>" . |
|
191 | - "<p>" . |
|
192 | - _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.") . "</p>"; |
|
190 | + sprintf(_("Do you provide helpdesk services for your users? If so, it would be nice if you would tell us the pointers to this helpdesk."), $uiElements->nomenclatureParticipant)."</p>". |
|
191 | + "<p>". |
|
192 | + _("If you enter a value here, it will be added to the installers for all your users, and will be displayed on the download page. If you operate separate helpdesks for different user groups (we call this 'profiles') specify per-profile helpdesk information later in this wizard. If you operate no help desk at all, just leave these fields empty.")."</p>"; |
|
193 | 193 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
194 | - echo "<p>" . sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME) ." " . _("This is the contact point for your end users' level 1 support.") . "</p>"; |
|
194 | + echo "<p>".sprintf(_("For %s deployments, providing at least a local e-mail contact is required."), core\ProfileSilverbullet::PRODUCTNAME)." "._("This is the contact point for your end users' level 1 support.")."</p>"; |
|
195 | 195 | } |
196 | 196 | } elseif (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
197 | - echo "<p>". _("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>"; |
|
197 | + echo "<p>"._("Providing at least a local support e-mail contact is required.")." "._("This is the contact point for your end users' level 1 support.")."</p>"; |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | } |
@@ -204,8 +204,8 @@ discard block |
||
204 | 204 | <button type='button' class='newoption' onclick='getXML("support", "<?php echo $my_inst->federation ?>")'><?php echo _("Add new option"); ?></button></fieldset> |
205 | 205 | <?php |
206 | 206 | if ($wizardStyle) { |
207 | - echo "<p>" . sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CONTINUE . "'>", "</button>") . "</p></form>"; |
|
207 | + echo "<p>".sprintf(_("When you are sure that everything is correct, please click on %sContinue ...%s"), "<button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CONTINUE."'>", "</button>")."</p></form>"; |
|
208 | 208 | } else { |
209 | - echo "<div><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_user.php\"'>" . _("Discard changes") . "</button></div></form>"; |
|
209 | + echo "<div><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button> <button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_user.php\"'>"._("Discard changes")."</button></div></form>"; |
|
210 | 210 | } |
211 | 211 | echo $deco->footer(); |
@@ -19,11 +19,11 @@ |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | \core\CAT::sessionStart(); |
25 | 25 | |
26 | -if (!isset($_GET["class"] )) { |
|
26 | +if (!isset($_GET["class"])) { |
|
27 | 27 | throw new Exception("Unknown type of option!"); |
28 | 28 | } |
29 | 29 |
@@ -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(dirname(__FILE__)))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $loggerInstance = new \core\common\Logging(); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $remaining_attribs = $my_profile->beginFlushMethodLevelAttributes($eaptype->getIntegerRep(), NULL); |
86 | 86 | $optionParser->processSubmittedFields($my_profile, $_POST, $_FILES, $eaptype->getIntegerRep(), NULL); |
87 | 87 | } |
88 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $my_profile->identifier . " - device/EAP-Type settings changed"); |
|
88 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$my_profile->identifier." - device/EAP-Type settings changed"); |
|
89 | 89 | header("Location: ../overview_installers.php?inst_id=$my_inst->identifier&profile_id=$my_profile->identifier"); |
90 | 90 | exit; |
91 | 91 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | $captiontext = sprintf(_("device <strong>%s</strong>"), $device['display']); |
101 | 101 | $keyword = "device-specific"; |
102 | - $extrainput = "<input type='hidden' name='device' value='" . $device_key . "'/>"; |
|
102 | + $extrainput = "<input type='hidden' name='device' value='".$device_key."'/>"; |
|
103 | 103 | } elseif ($eaptype !== NULL) { |
104 | 104 | foreach ($my_profile->getAttributes() as $attrib) { |
105 | 105 | if (isset($attrib['eapmethod']) && $attrib['eapmethod'] == $eaptype->getArrayRep()) { |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | |
110 | 110 | $captiontext = sprintf(_("EAP-Type <strong>%s</strong>"), $eaptype->getPrintableRep()); |
111 | 111 | $keyword = "eap-specific"; |
112 | - $extrainput = "<input type='hidden' name='eaptype' value='" . $eaptype->getIntegerRep() . "'>"; |
|
112 | + $extrainput = "<input type='hidden' name='eaptype' value='".$eaptype->getIntegerRep()."'>"; |
|
113 | 113 | } else { |
114 | 114 | throw new Exception("previous type checks make it impossible to reach this code path."); |
115 | 115 | } |
116 | 116 | ?> |
117 | -<p><?php echo _("Fine-tuning options for ") . $captiontext; ?></p> |
|
117 | +<p><?php echo _("Fine-tuning options for ").$captiontext; ?></p> |
|
118 | 118 | <hr/> |
119 | 119 | |
120 | 120 | <form action='inc/toggleRedirect.inc.php?inst_id=<?php echo $my_inst->identifier; ?>&profile_id=<?php echo $my_profile->identifier; ?>' method='post' accept-charset='UTF-8'><?php echo $extrainput; ?> |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $interesting_attribs = []; |
124 | 124 | |
125 | 125 | foreach ($attribs as $attrib) { |
126 | - if ($attrib['level'] == \core\Options::LEVEL_METHOD && preg_match('/^' . $keyword . ':/', $attrib['name'])) { |
|
126 | + if ($attrib['level'] == \core\Options::LEVEL_METHOD && preg_match('/^'.$keyword.':/', $attrib['name'])) { |
|
127 | 127 | $interesting_attribs[] = $attrib; |
128 | 128 | } |
129 | 129 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | echo $optionDisplay->prefilledOptionTable($keyword, $my_inst->federation); |
132 | 132 | if (\config\Master::DB['INST']['readonly'] === FALSE) { |
133 | 133 | ?> |
134 | - <button type='button' class='newoption' onclick='getXML("<?php echo $keyword;?>", "<?php echo $my_inst->federation;?>")'><?php echo _("Add new option"); ?></button> |
|
134 | + <button type='button' class='newoption' onclick='getXML("<?php echo $keyword; ?>", "<?php echo $my_inst->federation; ?>")'><?php echo _("Add new option"); ?></button> |
|
135 | 135 | <br/> |
136 | 136 | <hr/> |
137 | 137 | <button type='submit' name='submitbutton' id='submitbutton' value='<?php echo web\lib\common\FormElements::BUTTON_SAVE; ?>'><?php echo _("Save data"); ?></button> |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | ], |
91 | 91 | 'condition' => TRUE], |
92 | 92 | 'OpenRoaming®' => [ |
93 | - 'ssid' => [], /* OpenRoaming has left SSIDs behind */ |
|
93 | + 'ssid' => [], /* OpenRoaming has left SSIDs behind */ |
|
94 | 94 | 'oi' => [ |
95 | 95 | '5A03BA0000', /* OpenRoaming/AllIdentities/SettlementFree/NoPersonalData/BaselineQoS */ |
96 | 96 | '5A03BA0800', /* OpenRoaming/EduIdentities/SettlementFree/NoPersonalData/BaselineQoS */ |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | const PATHS = [ |
151 | 151 | 'makensis' => 'makensis', |
152 | 152 | 'trust-store-mozilla' => '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem', |
153 | - 'trust-store-custom' => __DIR__ . "/known-roots.pem", |
|
153 | + 'trust-store-custom' => __DIR__."/known-roots.pem", |
|
154 | 154 | ]; |
155 | 155 | |
156 | 156 | /** |
@@ -188,13 +188,13 @@ discard block |
||
188 | 188 | 'db' => 'radacct', |
189 | 189 | 'user' => 'someuser', |
190 | 190 | 'pass' => 'somepass', |
191 | - 'readonly' => TRUE,], |
|
191 | + 'readonly' => TRUE, ], |
|
192 | 192 | 'RADIUS_2' => [ |
193 | 193 | 'host' => 'auth-2.hosted.eduroam.org', |
194 | 194 | 'db' => 'radacct', |
195 | 195 | 'user' => 'someuser', |
196 | 196 | 'pass' => 'somepass', |
197 | - 'readonly' => TRUE,], |
|
197 | + 'readonly' => TRUE, ], |
|
198 | 198 | ]; |
199 | 199 | |
200 | 200 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | } |
166 | 166 | } |
167 | 167 | |
168 | - $this->loggerInstance->debug(4, "RADIUSTests is in opMode " . $this->opMode . ", parameters were: $realm, $outerUsernameForChecks, " . /** @scrutinizer ignore-type */ print_r($supportedEapTypes, true)); |
|
168 | + $this->loggerInstance->debug(4, "RADIUSTests is in opMode ".$this->opMode.", parameters were: $realm, $outerUsernameForChecks, "./** @scrutinizer ignore-type */ print_r($supportedEapTypes, true)); |
|
169 | 169 | $this->loggerInstance->debug(4, /** @scrutinizer ignore-type */ print_r($expectedServerNames, true)); |
170 | 170 | $this->loggerInstance->debug(4, /** @scrutinizer ignore-type */ print_r($expectedCABundle, true)); |
171 | 171 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | $returnarray[] = RADIUSTests::CERTPROB_WILDCARD_IN_NAME; |
253 | 253 | continue; // otherwise we'd ALSO complain that it's not a real hostname |
254 | 254 | } |
255 | - if ($onename != "" && filter_var("foo@" . idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) { |
|
255 | + if ($onename != "" && filter_var("foo@".idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) { |
|
256 | 256 | $returnarray[] = RADIUSTests::CERTPROB_NOT_A_HOSTNAME; |
257 | 257 | } |
258 | 258 | } |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $probValue = RADIUSTests::CERTPROB_SHA1_SIGNATURE; |
279 | 279 | $returnarray[] = $probValue; |
280 | 280 | } |
281 | - $this->loggerInstance->debug(4, "CERT IS: " . /** @scrutinizer ignore-type */ print_r($intermediateCa, TRUE)); |
|
281 | + $this->loggerInstance->debug(4, "CERT IS: "./** @scrutinizer ignore-type */ print_r($intermediateCa, TRUE)); |
|
282 | 282 | if ($intermediateCa['basicconstraints_set'] == 0) { |
283 | 283 | $returnarray[] = RADIUSTests::CERTPROB_NO_BASICCONSTRAINTS; |
284 | 284 | } |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | public function udpReachability($probeindex, $opnameCheck = TRUE, $frag = TRUE) { |
327 | 327 | // for EAP-TLS to be a viable option, we need to pass a random client cert to make eapol_test happy |
328 | 328 | // the following PEM data is one of the SENSE EAPLab client certs (not secret at all) |
329 | - $clientcert = file_get_contents(dirname(__FILE__) . "/clientcert.p12"); |
|
329 | + $clientcert = file_get_contents(dirname(__FILE__)."/clientcert.p12"); |
|
330 | 330 | if ($clientcert === FALSE) { |
331 | 331 | throw new Exception("A dummy client cert is part of the source distribution, but could not be loaded!"); |
332 | 332 | } |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | if ($this->opMode == self::RADIUS_TEST_OPERATION_MODE_THOROUGH) { |
336 | 336 | return $this->udpLogin($probeindex, $this->supportedEapTypes[0]->getArrayRep(), $this->outerUsernameForChecks, 'eaplab', $opnameCheck, $frag, $clientcert); |
337 | 337 | } |
338 | - return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@" . $this->realm, 'eaplab', $opnameCheck, $frag, $clientcert); |
|
338 | + return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@".$this->realm, 'eaplab', $opnameCheck, $frag, $clientcert); |
|
339 | 339 | } |
340 | 340 | |
341 | 341 | /** |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | return RADIUSTests::CERTPROB_NO_CDP_HTTP; |
357 | 357 | } |
358 | 358 | // first and second sub-match is the full URL... check it |
359 | - $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1] . $crlUrl[2])); |
|
359 | + $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1].$crlUrl[2])); |
|
360 | 360 | if ($crlcontent === FALSE) { |
361 | 361 | return RADIUSTests::CERTPROB_NO_CRL_AT_CDP_URL; |
362 | 362 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | // $pem = chunk_split(base64_encode($crlcontent), 64, "\n"); |
372 | 372 | // inspired by https://stackoverflow.com/questions/2390604/how-to-pass-variables-as-stdin-into-command-line-from-php |
373 | 373 | |
374 | - $proc = \config\Master::PATHS['openssl'] . " crl -inform der"; |
|
374 | + $proc = \config\Master::PATHS['openssl']." crl -inform der"; |
|
375 | 375 | $descriptorspec = [ |
376 | 376 | 0 => ["pipe", "r"], |
377 | 377 | 1 => ["pipe", "w"], |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $origLength = strlen($hex); |
410 | 410 | for ($i = 1; $i < $origLength; $i++) { |
411 | 411 | if ($i % 2 == 1 && $i != strlen($hex)) { |
412 | - $spaced .= $hex[$i] . " "; |
|
412 | + $spaced .= $hex[$i]." "; |
|
413 | 413 | } else { |
414 | 414 | $spaced .= $hex[$i]; |
415 | 415 | } |
@@ -534,19 +534,19 @@ discard block |
||
534 | 534 | $eapText = \core\common\EAP::eapDisplayName($eaptype); |
535 | 535 | $config = ' |
536 | 536 | network={ |
537 | - ssid="' . \config\Master::APPEARANCE['productname'] . ' testing" |
|
537 | + ssid="' . \config\Master::APPEARANCE['productname'].' testing" |
|
538 | 538 | key_mgmt=WPA-EAP |
539 | 539 | proto=WPA2 |
540 | 540 | pairwise=CCMP |
541 | 541 | group=CCMP |
542 | 542 | '; |
543 | 543 | // phase 1 |
544 | - $config .= 'eap=' . $eapText['OUTER'] . "\n"; |
|
544 | + $config .= 'eap='.$eapText['OUTER']."\n"; |
|
545 | 545 | $logConfig = $config; |
546 | 546 | // phase 2 if applicable; all inner methods have passwords |
547 | 547 | if (isset($eapText['INNER']) && $eapText['INNER'] != "") { |
548 | - $config .= ' phase2="auth=' . $eapText['INNER'] . "\"\n"; |
|
549 | - $logConfig .= ' phase2="auth=' . $eapText['INNER'] . "\"\n"; |
|
548 | + $config .= ' phase2="auth='.$eapText['INNER']."\"\n"; |
|
549 | + $logConfig .= ' phase2="auth='.$eapText['INNER']."\"\n"; |
|
550 | 550 | } |
551 | 551 | // all methods set a password, except EAP-TLS |
552 | 552 | if ($eaptype != \core\common\EAP::EAPTYPE_TLS) { |
@@ -562,11 +562,11 @@ discard block |
||
562 | 562 | } |
563 | 563 | |
564 | 564 | // inner identity |
565 | - $config .= ' identity="' . $inner . "\"\n"; |
|
566 | - $logConfig .= ' identity="' . $inner . "\"\n"; |
|
565 | + $config .= ' identity="'.$inner."\"\n"; |
|
566 | + $logConfig .= ' identity="'.$inner."\"\n"; |
|
567 | 567 | // outer identity, may be equal |
568 | - $config .= ' anonymous_identity="' . $outer . "\"\n"; |
|
569 | - $logConfig .= ' anonymous_identity="' . $outer . "\"\n"; |
|
568 | + $config .= ' anonymous_identity="'.$outer."\"\n"; |
|
569 | + $logConfig .= ' anonymous_identity="'.$outer."\"\n"; |
|
570 | 570 | // done |
571 | 571 | $config .= "}"; |
572 | 572 | $logConfig .= "}"; |
@@ -627,13 +627,13 @@ discard block |
||
627 | 627 | * @return string the command-line for eapol_test |
628 | 628 | */ |
629 | 629 | private function eapolTestConfig($probeindex, $opName, $frag) { |
630 | - $cmdline = \config\Diagnostics::PATHS['eapol_test'] . |
|
631 | - " -a " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['ip'] . |
|
632 | - " -s " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['secret'] . |
|
633 | - " -o serverchain.pem" . |
|
634 | - " -c ./udp_login_test.conf" . |
|
635 | - " -M 22:44:66:CA:20:" . sprintf("%02d", $probeindex) . " " . |
|
636 | - " -t " . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['timeout'] . " "; |
|
630 | + $cmdline = \config\Diagnostics::PATHS['eapol_test']. |
|
631 | + " -a ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['ip']. |
|
632 | + " -s ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['secret']. |
|
633 | + " -o serverchain.pem". |
|
634 | + " -c ./udp_login_test.conf". |
|
635 | + " -M 22:44:66:CA:20:".sprintf("%02d", $probeindex)." ". |
|
636 | + " -t ".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$probeindex]['timeout']." "; |
|
637 | 637 | if ($opName) { |
638 | 638 | $cmdline .= '-N126:s:"1cat.eduroam.org" '; |
639 | 639 | } |
@@ -662,10 +662,10 @@ discard block |
||
662 | 662 | * @throws Exception |
663 | 663 | */ |
664 | 664 | private function createCArepository($tmpDir, &$intermOdditiesCAT, $servercert, $eapIntermediates, $eapIntermediateCRLs) { |
665 | - if (!mkdir($tmpDir . "/root-ca-allcerts/", 0700, true)) { |
|
665 | + if (!mkdir($tmpDir."/root-ca-allcerts/", 0700, true)) { |
|
666 | 666 | throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-allcerts/\n"); |
667 | 667 | } |
668 | - if (!mkdir($tmpDir . "/root-ca-eaponly/", 0700, true)) { |
|
668 | + if (!mkdir($tmpDir."/root-ca-eaponly/", 0700, true)) { |
|
669 | 669 | throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-eaponly/\n"); |
670 | 670 | } |
671 | 671 | // make a copy of the EAP-received chain and add the configured intermediates, if any |
@@ -679,15 +679,15 @@ discard block |
||
679 | 679 | } |
680 | 680 | if ($decoded['ca'] == 1) { |
681 | 681 | if ($decoded['root'] == 1) { // save CAT roots to the root directory |
682 | - file_put_contents($tmpDir . "/root-ca-eaponly/configuredroot" . count($catRoots) . ".pem", $decoded['pem']); |
|
683 | - file_put_contents($tmpDir . "/root-ca-allcerts/configuredroot" . count($catRoots) . ".pem", $decoded['pem']); |
|
682 | + file_put_contents($tmpDir."/root-ca-eaponly/configuredroot".count($catRoots).".pem", $decoded['pem']); |
|
683 | + file_put_contents($tmpDir."/root-ca-allcerts/configuredroot".count($catRoots).".pem", $decoded['pem']); |
|
684 | 684 | $catRoots[] = $decoded['pem']; |
685 | 685 | } else { // save the intermediates to allcerts directory |
686 | - file_put_contents($tmpDir . "/root-ca-allcerts/cat-intermediate" . count($catIntermediates) . ".pem", $decoded['pem']); |
|
686 | + file_put_contents($tmpDir."/root-ca-allcerts/cat-intermediate".count($catIntermediates).".pem", $decoded['pem']); |
|
687 | 687 | $intermOdditiesCAT = array_merge($intermOdditiesCAT, $this->propertyCheckIntermediate($decoded)); |
688 | 688 | if (isset($decoded['CRL']) && isset($decoded['CRL'][0])) { |
689 | 689 | $this->loggerInstance->debug(4, "got an intermediate CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain"); |
690 | - file_put_contents($tmpDir . "/root-ca-allcerts/crl_cat" . count($catIntermediates) . ".pem", $decoded['CRL'][0]); |
|
690 | + file_put_contents($tmpDir."/root-ca-allcerts/crl_cat".count($catIntermediates).".pem", $decoded['CRL'][0]); |
|
691 | 691 | } |
692 | 692 | $catIntermediates[] = $decoded['pem']; |
693 | 693 | } |
@@ -696,26 +696,26 @@ discard block |
||
696 | 696 | // save all intermediate certificates and CRLs to separate files in |
697 | 697 | // both root-ca directories |
698 | 698 | foreach ($eapIntermediates as $index => $onePem) { |
699 | - file_put_contents($tmpDir . "/root-ca-eaponly/intermediate$index.pem", $onePem); |
|
700 | - file_put_contents($tmpDir . "/root-ca-allcerts/intermediate$index.pem", $onePem); |
|
699 | + file_put_contents($tmpDir."/root-ca-eaponly/intermediate$index.pem", $onePem); |
|
700 | + file_put_contents($tmpDir."/root-ca-allcerts/intermediate$index.pem", $onePem); |
|
701 | 701 | } |
702 | 702 | foreach ($eapIntermediateCRLs as $index => $onePem) { |
703 | - file_put_contents($tmpDir . "/root-ca-eaponly/intermediateCRL$index.pem", $onePem); |
|
704 | - file_put_contents($tmpDir . "/root-ca-allcerts/intermediateCRL$index.pem", $onePem); |
|
703 | + file_put_contents($tmpDir."/root-ca-eaponly/intermediateCRL$index.pem", $onePem); |
|
704 | + file_put_contents($tmpDir."/root-ca-allcerts/intermediateCRL$index.pem", $onePem); |
|
705 | 705 | } |
706 | 706 | |
707 | 707 | $checkstring = ""; |
708 | 708 | if (isset($servercert['CRL']) && isset($servercert['CRL'][0])) { |
709 | 709 | $this->loggerInstance->debug(4, "got a server CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain"); |
710 | 710 | $checkstring = "-crl_check_all"; |
711 | - file_put_contents($tmpDir . "/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]); |
|
712 | - file_put_contents($tmpDir . "/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]); |
|
711 | + file_put_contents($tmpDir."/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]); |
|
712 | + file_put_contents($tmpDir."/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]); |
|
713 | 713 | } |
714 | 714 | |
715 | 715 | |
716 | 716 | // now c_rehash the root CA directory ... |
717 | - system(\config\Diagnostics::PATHS['c_rehash'] . " $tmpDir/root-ca-eaponly/ > /dev/null"); |
|
718 | - system(\config\Diagnostics::PATHS['c_rehash'] . " $tmpDir/root-ca-allcerts/ > /dev/null"); |
|
717 | + system(\config\Diagnostics::PATHS['c_rehash']." $tmpDir/root-ca-eaponly/ > /dev/null"); |
|
718 | + system(\config\Diagnostics::PATHS['c_rehash']." $tmpDir/root-ca-allcerts/ > /dev/null"); |
|
719 | 719 | return $checkstring; |
720 | 720 | } |
721 | 721 | |
@@ -747,12 +747,12 @@ discard block |
||
747 | 747 | // so test if there's something PEMy in the file at all |
748 | 748 | // serverchain.pem is the output from eapol_test; incomingserver.pem is written by extractIncomingCertsfromEAP() if there was at least one server cert. |
749 | 749 | if (filesize("$tmpDir/serverchain.pem") > 10 && filesize("$tmpDir/incomingserver.pem") > 10) { |
750 | - exec(\config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly); |
|
751 | - $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n"); |
|
752 | - $this->loggerInstance->debug(4, "Chain verify pass 1: " . /** @scrutinizer ignore-type */ print_r($verifyResultEaponly, TRUE) . "\n"); |
|
753 | - exec(\config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts); |
|
754 | - $this->loggerInstance->debug(4, \config\Master::PATHS['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n"); |
|
755 | - $this->loggerInstance->debug(4, "Chain verify pass 2: " . /** @scrutinizer ignore-type */ print_r($verifyResultAllcerts, TRUE) . "\n"); |
|
750 | + exec(\config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly); |
|
751 | + $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n"); |
|
752 | + $this->loggerInstance->debug(4, "Chain verify pass 1: "./** @scrutinizer ignore-type */ print_r($verifyResultEaponly, TRUE)."\n"); |
|
753 | + exec(\config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts); |
|
754 | + $this->loggerInstance->debug(4, \config\Master::PATHS['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n"); |
|
755 | + $this->loggerInstance->debug(4, "Chain verify pass 2: "./** @scrutinizer ignore-type */ print_r($verifyResultAllcerts, TRUE)."\n"); |
|
756 | 756 | } |
757 | 757 | |
758 | 758 | // now we do certificate verification against the collected parents |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | // we are UNHAPPY if no names match! |
818 | 818 | $happiness = "UNHAPPY"; |
819 | 819 | foreach ($this->expectedServerNames as $expectedName) { |
820 | - $this->loggerInstance->debug(4, "Managing expectations for $expectedName: " . /** @scrutinizer ignore-type */ print_r($servercert['CN'], TRUE) . /** @scrutinizer ignore-type */ print_r($servercert['sAN_DNS'], TRUE)); |
|
820 | + $this->loggerInstance->debug(4, "Managing expectations for $expectedName: "./** @scrutinizer ignore-type */ print_r($servercert['CN'], TRUE)./** @scrutinizer ignore-type */ print_r($servercert['sAN_DNS'], TRUE)); |
|
821 | 821 | if (array_search($expectedName, $servercert['CN']) !== FALSE && array_search($expectedName, $servercert['sAN_DNS']) !== FALSE) { |
822 | 822 | $this->loggerInstance->debug(4, "Totally happy!"); |
823 | 823 | $happiness = "TOTALLY"; |
@@ -861,11 +861,11 @@ discard block |
||
861 | 861 | $theconfigs = $this->wpaSupplicantConfig($eaptype, $finalInner, $finalOuter, $password); |
862 | 862 | // the config intentionally does not include CA checking. We do this |
863 | 863 | // ourselves after getting the chain with -o. |
864 | - file_put_contents($tmpDir . "/udp_login_test.conf", $theconfigs[0]); |
|
864 | + file_put_contents($tmpDir."/udp_login_test.conf", $theconfigs[0]); |
|
865 | 865 | |
866 | 866 | $cmdline = $this->eapolTestConfig($probeindex, $opnameCheck, $frag); |
867 | 867 | $this->loggerInstance->debug(4, "Shallow reachability check cmdline: $cmdline\n"); |
868 | - $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n" . $theconfigs[1] . "\n"); |
|
868 | + $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n".$theconfigs[1]."\n"); |
|
869 | 869 | $time_start = microtime(true); |
870 | 870 | $pflow = []; |
871 | 871 | exec($cmdline, $pflow); |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | } |
875 | 875 | $time_stop = microtime(true); |
876 | 876 | $output = print_r($this->redact($password, $pflow), TRUE); |
877 | - file_put_contents($tmpDir . "/eapol_test_output_redacted_$probeindex.txt", $output); |
|
877 | + file_put_contents($tmpDir."/eapol_test_output_redacted_$probeindex.txt", $output); |
|
878 | 878 | $this->loggerInstance->debug(5, "eapol_test output saved to eapol_test_output_redacted_$probeindex.txt\n"); |
879 | 879 | return [ |
880 | 880 | "time" => ($time_stop - $time_start) * 1000, |
@@ -910,7 +910,7 @@ discard block |
||
910 | 910 | if ($packetflow[count($packetflow) - 1] == 3 && $this->checkLineparse($packetflow_orig, self::LINEPARSE_CHECK_REJECTIGNORE)) { |
911 | 911 | array_pop($packetflow); |
912 | 912 | } |
913 | - $this->loggerInstance->debug(5, "Packetflow: " . /** @scrutinizer ignore-type */ print_r($packetflow, TRUE)); |
|
913 | + $this->loggerInstance->debug(5, "Packetflow: "./** @scrutinizer ignore-type */ print_r($packetflow, TRUE)); |
|
914 | 914 | $packetcount = array_count_values($packetflow); |
915 | 915 | $testresults['packetcount'] = $packetcount; |
916 | 916 | $testresults['packetflow'] = $packetflow; |
@@ -950,7 +950,7 @@ discard block |
||
950 | 950 | */ |
951 | 951 | private function wasModernTlsNegotiated(&$testresults, $packetflow_orig) { |
952 | 952 | $negotiatedTlsVersion = $this->checkLineparse($packetflow_orig, self::LINEPARSE_TLSVERSION); |
953 | - $this->loggerInstance->debug(4, "TLS version found is: $negotiatedTlsVersion" . "\n"); |
|
953 | + $this->loggerInstance->debug(4, "TLS version found is: $negotiatedTlsVersion"."\n"); |
|
954 | 954 | if ($negotiatedTlsVersion === FALSE) { |
955 | 955 | $testresults['cert_oddities'][] = RADIUSTests::TLSPROB_UNKNOWN_TLS_VERSION; |
956 | 956 | } elseif ($negotiatedTlsVersion != self::TLS_VERSION_1_2 && $negotiatedTlsVersion != self::TLS_VERSION_1_3) { |
@@ -1008,7 +1008,7 @@ discard block |
||
1008 | 1008 | |
1009 | 1009 | $x509 = new \core\common\X509(); |
1010 | 1010 | // $eap_certarray holds all certs received in EAP conversation |
1011 | - $incomingData = file_get_contents($tmpDir . "/serverchain.pem"); |
|
1011 | + $incomingData = file_get_contents($tmpDir."/serverchain.pem"); |
|
1012 | 1012 | if ($incomingData !== FALSE && strlen($incomingData) > 0) { |
1013 | 1013 | $eapCertArray = $x509->splitCertificate($incomingData); |
1014 | 1014 | } else { |
@@ -1039,10 +1039,10 @@ discard block |
||
1039 | 1039 | case RADIUSTests::SERVER_CA_SELFSIGNED: |
1040 | 1040 | $servercert[] = $cert; |
1041 | 1041 | if (count($servercert) == 1) { |
1042 | - if (file_put_contents($tmpDir . "/incomingserver.pem", $cert['pem'] . "\n") === FALSE) { |
|
1042 | + if (file_put_contents($tmpDir."/incomingserver.pem", $cert['pem']."\n") === FALSE) { |
|
1043 | 1043 | $this->loggerInstance->debug(4, "The (first) server certificate could not be written to $tmpDir/incomingserver.pem!\n"); |
1044 | 1044 | } |
1045 | - $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: " . /** @scrutinizer ignore-type */ print_r($servercert[0], true)); |
|
1045 | + $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: "./** @scrutinizer ignore-type */ print_r($servercert[0], true)); |
|
1046 | 1046 | } elseif (!in_array(RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS, $testresults['cert_oddities'])) { |
1047 | 1047 | $testresults['cert_oddities'][] = RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS; |
1048 | 1048 | } |
@@ -1112,7 +1112,7 @@ discard block |
||
1112 | 1112 | public function autodetectCAWithProbe($outerId) { |
1113 | 1113 | // for EAP-TLS to be a viable option, we need to pass a random client cert to make eapol_test happy |
1114 | 1114 | // the following PEM data is one of the SENSE EAPLab client certs (not secret at all) |
1115 | - $clientcert = file_get_contents(dirname(__FILE__) . "/clientcert.p12"); |
|
1115 | + $clientcert = file_get_contents(dirname(__FILE__)."/clientcert.p12"); |
|
1116 | 1116 | if ($clientcert === FALSE) { |
1117 | 1117 | throw new Exception("A dummy client cert is part of the source distribution, but could not be loaded!"); |
1118 | 1118 | } |
@@ -1127,7 +1127,7 @@ discard block |
||
1127 | 1127 | $tmpDir = $temporary['dir']; |
1128 | 1128 | chdir($tmpDir); |
1129 | 1129 | $this->loggerInstance->debug(4, "temp dir: $tmpDir\n"); |
1130 | - file_put_contents($tmpDir . "/client.p12", $clientcert); |
|
1130 | + file_put_contents($tmpDir."/client.p12", $clientcert); |
|
1131 | 1131 | $testresults = ['cert_oddities' => []]; |
1132 | 1132 | $runtime_results = $this->executeEapolTest($tmpDir, $probeindex, \core\common\EAP::EAPTYPE_ANY, $outerId, $outerId, "eaplab", FALSE, FALSE); |
1133 | 1133 | $packetflow_orig = $runtime_results['output']; |
@@ -1143,8 +1143,7 @@ discard block |
||
1143 | 1143 | // that's not the case if we do EAP-pwd or could not negotiate an EAP method at |
1144 | 1144 | // all |
1145 | 1145 | // in that case: no server CA guess possible |
1146 | - if (! |
|
1147 | - ($radiusResult == RADIUSTests::RETVAL_CONVERSATION_REJECT && $negotiatedEapType) || $radiusResult == RADIUSTests::RETVAL_OK |
|
1146 | + if (!($radiusResult == RADIUSTests::RETVAL_CONVERSATION_REJECT && $negotiatedEapType) || $radiusResult == RADIUSTests::RETVAL_OK |
|
1148 | 1147 | ) { |
1149 | 1148 | return RADIUSTests::RETVAL_INVALID; |
1150 | 1149 | } |
@@ -1183,7 +1182,7 @@ discard block |
||
1183 | 1182 | // trust, and custom ones we may have configured |
1184 | 1183 | $ourRoots = file_get_contents(\config\ConfAssistant::PATHS['trust-store-custom']); |
1185 | 1184 | $mozillaRoots = file_get_contents(\config\ConfAssistant::PATHS['trust-store-mozilla']); |
1186 | - $allRoots = $x509->splitCertificate($ourRoots . "\n" . $mozillaRoots); |
|
1185 | + $allRoots = $x509->splitCertificate($ourRoots."\n".$mozillaRoots); |
|
1187 | 1186 | foreach ($allRoots as $oneRoot) { |
1188 | 1187 | $processedRoot = $x509->processCertificate($oneRoot); |
1189 | 1188 | if ($processedRoot['full_details']['subject'] == $currentHighestKnownIssuer) { |
@@ -1225,7 +1224,7 @@ discard block |
||
1225 | 1224 | chdir($tmpDir); |
1226 | 1225 | $this->loggerInstance->debug(4, "temp dir: $tmpDir\n"); |
1227 | 1226 | if ($clientcertdata !== NULL) { |
1228 | - file_put_contents($tmpDir . "/client.p12", $clientcertdata); |
|
1227 | + file_put_contents($tmpDir."/client.p12", $clientcertdata); |
|
1229 | 1228 | } |
1230 | 1229 | $testresults = []; |
1231 | 1230 | // initialise the sub-array for cleaner parsing |
@@ -1330,7 +1329,7 @@ discard block |
||
1330 | 1329 | 'issuer' => $this->printDN($certdata['issuer']), |
1331 | 1330 | 'validFrom' => $this->printTm($certdata['validFrom_time_t']), |
1332 | 1331 | 'validTo' => $this->printTm($certdata['validTo_time_t']), |
1333 | - 'serialNumber' => $certdata['serialNumber'] . sprintf(" (0x%X)", $certdata['serialNumber']), |
|
1332 | + 'serialNumber' => $certdata['serialNumber'].sprintf(" (0x%X)", $certdata['serialNumber']), |
|
1334 | 1333 | 'sha1' => $certdata['sha1'], |
1335 | 1334 | 'extensions' => $certdata['extensions'] |
1336 | 1335 | ]; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | /* |
21 | 21 | * Class autoloader invocation, should be included prior to any other code at the entry points to the application |
22 | 22 | */ |
23 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
23 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
24 | 24 | |
25 | 25 | $auth = new \web\lib\admin\Authentication(); |
26 | 26 | $auth->authenticate(); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $fed = new \core\Federation($inst->federation); |
54 | 54 | $allowSb = $fed->getAttributes("fed:silverbullet"); |
55 | 55 | if (count($allowSb) == 0) { |
56 | - throw new Exception("We were told to create a new SB profile, but this " . \config\ConfAssistant::CONSORTIUM['nomenclature_federation'] . " does not allow SB at all!"); |
|
56 | + throw new Exception("We were told to create a new SB profile, but this ".\config\ConfAssistant::CONSORTIUM['nomenclature_federation']." does not allow SB at all!"); |
|
57 | 57 | } |
58 | 58 | // okay, new SB profiles are allowed. |
59 | 59 | // but is there a support:email attribute on inst level? |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | // Create one. |
65 | 65 | $newProfile = $inst->newProfile(core\AbstractProfile::PROFILETYPE_SILVERBULLET); |
66 | 66 | // and modify the REQUEST_URI to add the new profile ID |
67 | - $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI'] . "&profile_id=" . $newProfile->identifier; |
|
67 | + $_SERVER['REQUEST_URI'] = $_SERVER['REQUEST_URI']."&profile_id=".$newProfile->identifier; |
|
68 | 68 | $_GET['profile_id'] = $newProfile->identifier; |
69 | 69 | $profile = $newProfile; |
70 | 70 | } else { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if (isset($_POST['command'])) { |
90 | 90 | switch ($_POST['command']) { |
91 | 91 | case \web\lib\common\FormElements::BUTTON_CLOSE: |
92 | - header("Location: overview_org.php?inst_id=" . $inst->identifier); |
|
92 | + header("Location: overview_org.php?inst_id=".$inst->identifier); |
|
93 | 93 | break; |
94 | 94 | case \web\lib\common\FormElements::BUTTON_TERMSOFUSE: |
95 | 95 | if (isset($_POST['agreement']) && $_POST['agreement'] == 'true') { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | break; |
133 | 133 | } |
134 | 134 | $properName = $validator->syntaxConformUser($elements[0]); |
135 | - $properDate = new DateTime($elements[1] . " 00:00:00"); |
|
135 | + $properDate = new DateTime($elements[1]." 00:00:00"); |
|
136 | 136 | $numberOfActivations = $elements[2] ?? 5; |
137 | 137 | $number = $validator->integer($numberOfActivations); |
138 | 138 | if ($number === FALSE) { // invalid input received, default to sane |
@@ -235,18 +235,18 @@ discard block |
||
235 | 235 | // warn and ask for confirmation unless already confirmed |
236 | 236 | if (!isset($_POST['insecureconfirm']) || $_POST['insecureconfirm'] != "CONFIRM") { |
237 | 237 | echo $deco->pageheader(_("Insecure mail domain!"), "ADMIN-IDP-USERS"); |
238 | - echo "<p>" . sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail) . "</p>"; |
|
239 | - echo "<p>" . _("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.") . "</p>"; |
|
240 | - echo "<p>" . _("Do you want the system to send this mail anyway?") . "</p>"; |
|
238 | + echo "<p>".sprintf(_("The mail domain of the mail address <strong>%s</strong> is not secure: some or all of the mail servers are not accepting encrypted connections (no consistent support for STARTTLS)."), $properEmail)."</p>"; |
|
239 | + echo "<p>"._("The invitation would need to be sent in cleartext across the internet, and can possibly be read and abused by anyone in transit.")."</p>"; |
|
240 | + echo "<p>"._("Do you want the system to send this mail anyway?")."</p>"; |
|
241 | 241 | echo $formtext; |
242 | - echo "<button type='submit' class='delete'>" . _("DO NOT SEND") . "</button>"; |
|
242 | + echo "<button type='submit' class='delete'>"._("DO NOT SEND")."</button>"; |
|
243 | 243 | echo "</form>"; |
244 | 244 | echo $formtext; |
245 | - echo "<input type='hidden' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'</>"; |
|
245 | + echo "<input type='hidden' name='command' value='".\web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'</>"; |
|
246 | 246 | echo "<input type='hidden' name='address' value='$properEmail'</>"; |
247 | - echo "<input type='hidden' name='token' value='" . $invitationObject->invitationTokenString . "'</>"; |
|
247 | + echo "<input type='hidden' name='token' value='".$invitationObject->invitationTokenString."'</>"; |
|
248 | 248 | echo "<input type='hidden' name='insecureconfirm' value='CONFIRM'/>"; |
249 | - echo "<button type='submit'>" . _("Send anyway.") . "</button>"; |
|
249 | + echo "<button type='submit'>"._("Send anyway.")."</button>"; |
|
250 | 250 | echo "</form>"; |
251 | 251 | echo $deco->footer(); |
252 | 252 | exit; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | $activeUsers = $profile->listActiveUsers(); |
298 | 298 | |
299 | 299 | |
300 | -echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME )); |
|
300 | +echo $deco->defaultPagePrelude(sprintf(_('Managing %s users'), \core\ProfileSilverbullet::PRODUCTNAME)); |
|
301 | 301 | |
302 | 302 | ?> |
303 | 303 | <script src='js/option_expand.js' type='text/javascript'></script> |
@@ -337,12 +337,12 @@ discard block |
||
337 | 337 | <img src='../resources/images/icons/loading51.gif' id='spin' alt='loading...' style='position:absolute;left: 50%; top: 50%; transform: translate(-100px, -50px); display:none; z-index: 100;'> |
338 | 338 | <?php echo $uiElements->instLevelInfoBoxes($inst); ?> |
339 | 339 | <div class='infobox'> |
340 | - <h2><?php $tablecaption = sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); echo $tablecaption;?></h2> |
|
340 | + <h2><?php $tablecaption = sprintf(_('Current %s users'), \core\ProfileSilverbullet::PRODUCTNAME); echo $tablecaption; ?></h2> |
|
341 | 341 | <table> |
342 | - <caption><?php echo $tablecaption;?></caption> |
|
342 | + <caption><?php echo $tablecaption; ?></caption> |
|
343 | 343 | <tr> |
344 | - <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th> |
|
345 | - <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th> |
|
344 | + <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th> |
|
345 | + <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th> |
|
346 | 346 | </tr> |
347 | 347 | |
348 | 348 | <tr> |
@@ -366,19 +366,19 @@ discard block |
||
366 | 366 | case "NOSTIPULATION": |
367 | 367 | break; |
368 | 368 | case "EMAIL-SENT": |
369 | - echo $boundaryPre . $uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE) . $boundaryPost; |
|
369 | + echo $boundaryPre.$uiElements->boxOkay(_("The e-mail was sent successfully."), _("E-mail OK."), FALSE).$boundaryPost; |
|
370 | 370 | break; |
371 | 371 | case "EMAIL-NOTSENT": |
372 | - echo $boundaryPre . $uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE) . $boundaryPost; |
|
372 | + echo $boundaryPre.$uiElements->boxError(_("The e-mail was NOT sent."), _("E-mail not OK."), FALSE).$boundaryPost; |
|
373 | 373 | break; |
374 | 374 | case "SMS-SENT": |
375 | - echo $boundaryPre . $uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE) . $boundaryPost; |
|
375 | + echo $boundaryPre.$uiElements->boxOkay(_("The SMS was sent successfully."), _("SMS OK."), FALSE).$boundaryPost; |
|
376 | 376 | break; |
377 | 377 | case "SMS-NOTSENT": |
378 | - echo $boundaryPre . $uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE) . $boundaryPost; |
|
378 | + echo $boundaryPre.$uiElements->boxOkay(_("The SMS was NOT sent."), _("SMS not OK."), FALSE).$boundaryPost; |
|
379 | 379 | break; |
380 | 380 | case "SMS-FRAGMENT": |
381 | - echo $boundaryPre . $uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE) . $boundaryPost; |
|
381 | + echo $boundaryPre.$uiElements->boxWarning(_("Only a fragment of the SMS was sent. You should re-send it."), _("SMS Fragment."), FALSE).$boundaryPost; |
|
382 | 382 | break; |
383 | 383 | } |
384 | 384 | ?> |
@@ -391,17 +391,17 @@ discard block |
||
391 | 391 | <?php |
392 | 392 | $bufferCurrentUsers = "<table class='sb-user-table' style='max-width:1920px;'> |
393 | 393 | <tr class='sb-title-row'> |
394 | - <td>" . _("User") . "</td> |
|
395 | - <td>" . _("Token/Certificate details") . "</td> |
|
396 | - <td>" . _("User/Token Expiry") . "</td> |
|
397 | - <td>" . _("Actions") . "</td> |
|
394 | + <td>" . _("User")."</td> |
|
395 | + <td>" . _("Token/Certificate details")."</td> |
|
396 | + <td>" . _("User/Token Expiry")."</td> |
|
397 | + <td>" . _("Actions")."</td> |
|
398 | 398 | </tr>"; |
399 | 399 | $bufferPreviousUsers = "<table class='sb-user-table' style='max-width:1920px;'> |
400 | 400 | <tr class='sb-title-row'> |
401 | - <td>" . _("User") . "</td> |
|
402 | - <td>" . _("Certificate details") . "</td> |
|
403 | - <td>" . _("User Expiry") . "</td> |
|
404 | - <td>" . _("Actions") . "</td> |
|
401 | + <td>" . _("User")."</td> |
|
402 | + <td>" . _("Certificate details")."</td> |
|
403 | + <td>" . _("User Expiry")."</td> |
|
404 | + <td>" . _("Actions")."</td> |
|
405 | 405 | </tr>"; |
406 | 406 | |
407 | 407 | natsort($allUsers); |
@@ -458,23 +458,23 @@ discard block |
||
458 | 458 | $display = empty(devices\Devices::listDevices()[$oneCert->device]['display']) ? $oneCert->device : devices\Devices::listDevices()[$oneCert->device]['display']; |
459 | 459 | |
460 | 460 | $bufferText = "<div class='sb-certificate-summary ca-summary' $style> |
461 | - <div class='sb-certificate-details'>" . _("Device:") . " " . $display . |
|
462 | - "<br>" . _("Serial Number:") . " " . dechex($oneCert->serial) . |
|
463 | - "<br>" . _("CN:") . " " . explode('@', $oneCert->username)[0] . "@…" . |
|
464 | - "<br>" . _("Expiry:") . " " . $oneCert->expiry . |
|
465 | - "<br>" . _("Issued:") . " " . $oneCert->issued . |
|
466 | - "</div>" . |
|
461 | + <div class='sb-certificate-details'>"._("Device:")." ".$display. |
|
462 | + "<br>"._("Serial Number:")." ".dechex($oneCert->serial). |
|
463 | + "<br>"._("CN:")." ".explode('@', $oneCert->username)[0]."@…". |
|
464 | + "<br>"._("Expiry:")." ".$oneCert->expiry. |
|
465 | + "<br>"._("Issued:")." ".$oneCert->issued. |
|
466 | + "</div>". |
|
467 | 467 | "<div style='text-align:right;padding-top: 5px; $buttonStyle'>"; |
468 | 468 | |
469 | 469 | if ($buttonText == "") { |
470 | 470 | $bufferText .= $formtext |
471 | - . "<input type='hidden' name='certSerial' value='" . $oneCert->serial . "'/>" |
|
472 | - . "<input type='hidden' name='certAlgo' value='" . $oneCert->ca_type . "'/>" |
|
471 | + . "<input type='hidden' name='certSerial' value='".$oneCert->serial."'/>" |
|
472 | + . "<input type='hidden' name='certAlgo' value='".$oneCert->ca_type."'/>" |
|
473 | 473 | . "<button type='submit' " |
474 | 474 | . "name='command' " |
475 | - . "value='" . \web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL . "' " |
|
475 | + . "value='".\web\lib\common\FormElements::BUTTON_REVOKECREDENTIAL."' " |
|
476 | 476 | . "class='delete' " |
477 | - . "onclick='return confirm(\"" . sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name']) . "\")'>" |
|
477 | + . "onclick='return confirm(\"".sprintf(_("The device in question will stop functioning with %s. The revocation cannot be undone. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name'])."\")'>" |
|
478 | 478 | . _("Revoke") |
479 | 479 | . "</button>" |
480 | 480 | . "</form>"; |
@@ -499,13 +499,13 @@ discard block |
||
499 | 499 | } |
500 | 500 | // wrap the revoked and expired certs in a div that is hidden by default |
501 | 501 | if ($textRevokedCerts !== "") { |
502 | - $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked) . "</span><div id='$oneUserId-revoked-certs' style='display:none;'>" . $textRevokedCerts . "</div>"; |
|
502 | + $textRevokedCerts = "<span style='text-decoration: underline;' id='$oneUserId-revoked-heading' onclick='document.getElementById(\"$oneUserId-revoked-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-revoked-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d revoked certificate)", "(show %d revoked certificates)", $countRevoked), $countRevoked)."</span><div id='$oneUserId-revoked-certs' style='display:none;'>".$textRevokedCerts."</div>"; |
|
503 | 503 | } |
504 | 504 | if ($textExpiredCerts !== "") { |
505 | - $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>" . sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired) . "</span><div id='$oneUserId-expired-certs' style='display:none;'>" . $textExpiredCerts . "</div>"; |
|
505 | + $textExpiredCerts = "<span style='text-decoration: underline;' id='$oneUserId-expired-heading' onclick='document.getElementById(\"$oneUserId-expired-certs\").style.display = \"block\"; document.getElementById(\"$oneUserId-expired-heading\").style.display = \"none\";'>".sprintf(ngettext("(show %d expired certificate)", "(show %d expired certificates)", $countExpired), $countExpired)."</span><div id='$oneUserId-expired-certs' style='display:none;'>".$textExpiredCerts."</div>"; |
|
506 | 506 | } |
507 | 507 | // and push out the HTML |
508 | - ${$outputBuffer} .= $textActiveCerts . "<br/>" . $textExpiredCerts . " " . $textRevokedCerts . "</td>"; |
|
508 | + ${$outputBuffer} .= $textActiveCerts."<br/>".$textExpiredCerts." ".$textRevokedCerts."</td>"; |
|
509 | 509 | $tokenHtmlBuffer = ""; |
510 | 510 | $hasOnePendingInvite = FALSE; |
511 | 511 | foreach ($tokensWithoutCerts as $invitationObject) { |
@@ -516,38 +516,38 @@ discard block |
||
516 | 516 | $tokenHtmlBuffer .= "<tr class='sb-certificate-row'><td></td>"; |
517 | 517 | $jsEncodedBody = str_replace('\n', '%0D%0A', str_replace('"', '', json_encode($invitationObject->invitationMailBody()))); |
518 | 518 | $tokenHtmlBuffer .= "<td>"; |
519 | - $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='" . $invitationObject->link() . "' name='token' class='identifiedtokenarea-" . $invitationObject->identifier . "'>(…)<br/>"); |
|
519 | + $tokenHtmlBuffer .= sprintf(_("The invitation token %s is ready for sending! Choose how to send it:"), "<input type='text' readonly='readonly' style='background-color:lightgrey;' size='60' value='".$invitationObject->link()."' name='token' class='identifiedtokenarea-".$invitationObject->identifier."'>(…)<br/>"); |
|
520 | 520 | $tokenHtmlBuffer .= "<table> |
521 | - <tr><td style='vertical-align:bottom;'>" . _("E-Mail:") . "</td><td> |
|
521 | + <tr><td style='vertical-align:bottom;'>" . _("E-Mail:")."</td><td> |
|
522 | 522 | $formtext |
523 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
523 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
524 | 524 | <input type='text' name='address' id='address-$invitationObject->identifier'/> |
525 | - <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=" . $invitationObject->invitationMailSubject() . "&body=$jsEncodedBody\"; return false;'>" . _("Local mail client") . "</button> |
|
526 | - <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT . "'>" . _("Send with CAT") . "</button> |
|
525 | + <button type='button' onclick='window.location=\"mailto:\"+document.getElementById(\"address-$invitationObject->identifier\").value+\"?subject=".$invitationObject->invitationMailSubject()."&body=$jsEncodedBody\"; return false;'>"._("Local mail client")."</button> |
|
526 | + <button type='submit' name='command' onclick='document.getElementById(\"spin\").style.display =\"block\"' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONMAILBYCAT."'>"._("Send with CAT")."</button> |
|
527 | 527 | </form> |
528 | 528 | </td></tr> |
529 | - <tr><td style='vertical-align:bottom;'>" . _("SMS:") . "</td><td> |
|
529 | + <tr><td style='vertical-align:bottom;'>" . _("SMS:")."</td><td> |
|
530 | 530 | $formtext |
531 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
531 | + <input type='hidden' value='".$invitationObject->invitationTokenString."' name='token'><br/> |
|
532 | 532 | <input type='text' name='smsnumber' /> |
533 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS . "'>" . _("Send in SMS...") . "</button> |
|
533 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_SENDINVITATIONSMS."'>"._("Send in SMS...")."</button> |
|
534 | 534 | </form> |
535 | 535 | </td></tr> |
536 | - <tr><td style='vertical-align:bottom;'>" . _("Manual:") . "</td><td> |
|
537 | - <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier . ");'>" . _("Copy to Clipboard") . "</button> |
|
536 | + <tr><td style='vertical-align:bottom;'>" . _("Manual:")."</td><td> |
|
537 | + <button type='button' class='clipboardButton' onclick='clipboardCopy(" . $invitationObject->identifier.");'>"._("Copy to Clipboard")."</button> |
|
538 | 538 | <form style='display:inline-block;' method='post' action='inc/displayQRcode.inc.php' onsubmit='popupQRWindow(this); return false;' accept-charset='UTF-8'> |
539 | - <input type='hidden' value='" . $invitationObject->invitationTokenString . "' name='token'><br/> |
|
540 | - <button type='submit'>" . _("Display QR code") . "</button> |
|
539 | + <input type='hidden' value='" . $invitationObject->invitationTokenString."' name='token'><br/> |
|
540 | + <button type='submit'>" . _("Display QR code")."</button> |
|
541 | 541 | </form> |
542 | 542 | </td></tr> |
543 | 543 | |
544 | 544 | </table> |
545 | 545 | </td>"; |
546 | - $tokenHtmlBuffer .= "<td>" . _("Expiry Date:") . " " . $invitationObject->expiry . " UTC<br>" . _("Activations remaining:") . " " . sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal) . "</td>"; |
|
546 | + $tokenHtmlBuffer .= "<td>"._("Expiry Date:")." ".$invitationObject->expiry." UTC<br>"._("Activations remaining:")." ".sprintf(_("%d of %d"), $invitationObject->activationsRemaining, $invitationObject->activationsTotal)."</td>"; |
|
547 | 547 | $tokenHtmlBuffer .= "<td>" |
548 | 548 | . $formtext |
549 | - . "<input type='hidden' name='invitationtoken' value='" . $invitationObject->invitationTokenString . "'/>" |
|
550 | - . "<button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_REVOKEINVITATION . "' class='delete'>" . _("Revoke") . "</button></form>" |
|
549 | + . "<input type='hidden' name='invitationtoken' value='".$invitationObject->invitationTokenString."'/>" |
|
550 | + . "<button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_REVOKEINVITATION."' class='delete'>"._("Revoke")."</button></form>" |
|
551 | 551 | . "</td></tr>"; |
552 | 552 | break; |
553 | 553 | case core\SilverbulletInvitation::SB_TOKENSTATUS_EXPIRED: |
@@ -563,10 +563,10 @@ discard block |
||
563 | 563 | } |
564 | 564 | ${$outputBuffer} .= "<td>$formtext |
565 | 565 | <div class='sb-date-container' style='min-width: 200px;'> |
566 | - <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='" . $profile->getUserExpiryDate($oneUserId) . "'> (UTC)</span> |
|
566 | + <span><input type='text' maxlength='19' class='sb-date-picker' name='userexpiry' value='".$profile->getUserExpiryDate($oneUserId)."'> (UTC)</span> |
|
567 | 567 | </div> |
568 | 568 | <input type='hidden' name='userid' value='$oneUserId'/> |
569 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY . "'>" . _("Update") . "</button> |
|
569 | + <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_CHANGEUSEREXPIRY."'>"._("Update")."</button> |
|
570 | 570 | </form> |
571 | 571 | </td> |
572 | 572 | <td> |
@@ -574,33 +574,33 @@ discard block |
||
574 | 574 | |
575 | 575 | if ($hasOnePendingInvite || count($validCerts) > 0) { |
576 | 576 | $deletionText = sprintf(_("All of the currently active devices will stop functioning with %s. This cannot be undone. While the user can be re-activated later, they will then need to be re-provisioned with new invitation tokens. Are you sure you want to do this?"), \config\ConfAssistant::CONSORTIUM['display_name']); |
577 | - ${$outputBuffer} .= $formtext . " |
|
577 | + ${$outputBuffer} .= $formtext." |
|
578 | 578 | <input type='hidden' name='userid' value='$oneUserId'/> |
579 | 579 | <button type='submit' " |
580 | 580 | . "name='command' " |
581 | - . "value='" . \web\lib\common\FormElements::BUTTON_DEACTIVATEUSER . "' " |
|
581 | + . "value='".\web\lib\common\FormElements::BUTTON_DEACTIVATEUSER."' " |
|
582 | 582 | . "class='delete' " |
583 | - . ( count($validCerts) > 0 ? "onclick='return confirm(\"" . $deletionText . "\")' " : "" ) |
|
583 | + . (count($validCerts) > 0 ? "onclick='return confirm(\"".$deletionText."\")' " : "") |
|
584 | 584 | . ">" |
585 | 585 | . _("Deactivate User") |
586 | 586 | . "</button> |
587 | 587 | </form>"; |
588 | 588 | } |
589 | - ${$outputBuffer} .= "<form method='post' action='inc/userStats.inc.php?inst_id=" . $profile->institution . "&profile_id=" . $profile->identifier . "&user_id=$oneUserId' onsubmit='popupStatsWindow(this); return false;' accept-charset='UTF-8'> |
|
590 | - <button type='submit'>" . _("Show Authentication Records") . "</button> |
|
589 | + ${$outputBuffer} .= "<form method='post' action='inc/userStats.inc.php?inst_id=".$profile->institution."&profile_id=".$profile->identifier."&user_id=$oneUserId' onsubmit='popupStatsWindow(this); return false;' accept-charset='UTF-8'> |
|
590 | + <button type='submit'>"._("Show Authentication Records")."</button> |
|
591 | 591 | </form>"; |
592 | 592 | if (new DateTime() < new DateTime($expiryDate)) { // current user, allow sending new token |
593 | - ${$outputBuffer} .= $formtext . " |
|
593 | + ${$outputBuffer} .= $formtext." |
|
594 | 594 | <input type='hidden' name='userid' value='$oneUserId'/> |
595 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_NEWINVITATION . "'>" . _("New Invitation") . "</button> |
|
596 | - <label>" . _("Activations:") . " |
|
595 | + <button type='submit' name='command' value='".\web\lib\common\FormElements::BUTTON_NEWINVITATION."'>"._("New Invitation")."</button> |
|
596 | + <label>" . _("Activations:")." |
|
597 | 597 | <input type='text' name='invitationsquantity' value='5' maxlength='3' style='width: 30px;'/> |
598 | 598 | </label> |
599 | 599 | </form>"; |
600 | 600 | } elseif (count($profile->getUserAuthRecords($oneUserId)) == 0) { // previous user; if there are NO authentication records, allow full deletion - otherwise, need to keep user trace for abuse handling |
601 | - ${$outputBuffer} .= $formtext . " |
|
601 | + ${$outputBuffer} .= $formtext." |
|
602 | 602 | <input type='hidden' name='userid' value='$oneUserId'/> |
603 | - <button type='submit' class='delete' name='command' value='" . \web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Delete User") . "</button> |
|
603 | + <button type='submit' class='delete' name='command' value='".\web\lib\common\FormElements::BUTTON_DELETE."'>"._("Delete User")."</button> |
|
604 | 604 | </form>"; |
605 | 605 | } |
606 | 606 | ${$outputBuffer} .= "</div> |
@@ -632,13 +632,13 @@ discard block |
||
632 | 632 | . ' If all accounts shown as active above are indeed still valid, please check the box below and push "Save".' |
633 | 633 | . ' If any of the accounts are stale, please deactivate them by pushing the corresponding button before doing this.'), \config\ConfAssistant::SILVERBULLET['gracetime'] ?? core\ProfileSilverbullet::SB_ACKNOWLEDGEMENT_REQUIRED_DAYS); |
634 | 634 | |
635 | - echo $formtext . "<div style='padding-bottom: 20px;'>" |
|
635 | + echo $formtext."<div style='padding-bottom: 20px;'>" |
|
636 | 636 | . " |
637 | 637 | <p>$acknowledgeText</p> |
638 | 638 | <input type='checkbox' name='acknowledge' value='true'> |
639 | - <label>" . sprintf(_("I have verified that all configured users are still eligible for %s."),\config\ConfAssistant::CONSORTIUM['display_name']) . "</label> |
|
639 | + <label>".sprintf(_("I have verified that all configured users are still eligible for %s."), \config\ConfAssistant::CONSORTIUM['display_name'])."</label> |
|
640 | 640 | </div> |
641 | - <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY . "'>" . _("Save") . "</button></form>"; |
|
641 | + <button type='submit' name='command' value='" . \web\lib\common\FormElements::BUTTON_ACKUSERELIGIBILITY."'>"._("Save")."</button></form>"; |
|
642 | 642 | } |
643 | 643 | ?> |
644 | 644 | </div> |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -126,8 +126,8 @@ discard block |
||
126 | 126 | <?php |
127 | 127 | echo $uiElements->instLevelInfoBoxes($my_inst); |
128 | 128 | |
129 | - echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier" . ($my_profile !== NULL ? "&profile_id=" . $my_profile->identifier : "") . "' method='post' accept-charset='UTF-8'> |
|
130 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
129 | + echo "<form enctype='multipart/form-data' action='edit_profile_result.php?inst_id=$my_inst->identifier".($my_profile !== NULL ? "&profile_id=".$my_profile->identifier : "")."' method='post' accept-charset='UTF-8'> |
|
130 | + <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE."'>"; |
|
131 | 131 | $optionDisplay = new \web\lib\admin\OptionDisplay($profile_options, \core\Options::LEVEL_PROFILE); |
132 | 132 | ?> |
133 | 133 | <fieldset class="option_container"> |
@@ -136,19 +136,19 @@ discard block |
||
136 | 136 | </legend> |
137 | 137 | <?php |
138 | 138 | if ($wizardStyle) { |
139 | - echo "<p>" . _("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.") . "</p>"; |
|
139 | + echo "<p>"._("We will now define a profile for your user group(s). You can add as many profiles as you like by choosing the appropriate button on the end of the page. After we are done, the wizard is finished and you will be taken to the main IdP administration page.")."</p>"; |
|
140 | 140 | } |
141 | 141 | ?> |
142 | 142 | <h3><?php echo _("Profile Name and RADIUS realm"); ?></h3> |
143 | 143 | <?php |
144 | 144 | if ($wizardStyle) { |
145 | - echo "<p>" . _("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.") . "</p>"; |
|
146 | - echo "<p>" . _("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.") . "</p>"; |
|
147 | - echo "<p>" . _("You can also tell us your RADIUS realm. "); |
|
145 | + echo "<p>"._("First of all we need a name for the profile. This will be displayed to end users, so you may want to choose a descriptive name like 'Professors', 'Students of the Faculty of Bioscience', etc.")."</p>"; |
|
146 | + echo "<p>"._("Optionally, you can provide a longer descriptive text about who this profile is for. If you specify it, it will be displayed on the download page after the user has selected the profile name in the list.")."</p>"; |
|
147 | + echo "<p>"._("You can also tell us your RADIUS realm. "); |
|
148 | 148 | if (\config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] !== NULL) { |
149 | 149 | printf(_("This is useful if you want to use the sanity check module later, which tests reachability of your realm in the %s infrastructure. "), \config\ConfAssistant::CONSORTIUM['display_name']); |
150 | 150 | } |
151 | - echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).") . "</p>"; |
|
151 | + echo _("It is required to enter the realm name if you want to support anonymous outer identities (see below).")."</p>"; |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | echo $optionDisplay->prefilledOptionTable("profile", $my_inst->federation); |
@@ -203,9 +203,9 @@ discard block |
||
203 | 203 | |
204 | 204 | <?php |
205 | 205 | if ($wizardStyle) { |
206 | - echo "<p>" . sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types") . "</p>"; |
|
207 | - echo "<p>" . _("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.") . "</p>"; |
|
208 | - echo "<p>" . _("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.") . "</p>"; |
|
206 | + echo "<p>".sprintf(_("Some installers support a feature called 'Anonymous outer identity'. If you don't know what this is, please read <a href='%s'>this article</a>."), "https://confluence.terena.org/display/H2eduroam/eap-types")."</p>"; |
|
207 | + echo "<p>"._("On some platforms, the installers can suggest username endings and/or verify the user input to contain the realm suffix.")."</p>"; |
|
208 | + echo "<p>"._("The realm check feature needs to know an outer ID which actually gets a chance to authenticate. If your RADIUS server lets only select usernames pass, it is useful to supply the information which of those (outer ID) username we can use for testing.")."</p>"; |
|
209 | 209 | } |
210 | 210 | ?> |
211 | 211 | <p> |
@@ -224,37 +224,37 @@ discard block |
||
224 | 224 | <tr> |
225 | 225 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
226 | 226 | <td> |
227 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
227 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
228 | 228 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
229 | 229 | </span> |
230 | 230 | </td> |
231 | 231 | <td> |
232 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
232 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
233 | 233 | if (this.form.elements["anon_support"].checked !== true) { |
234 | 234 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
235 | 235 | } else { |
236 | 236 | this.form.elements["anon_local"].removeAttribute("disabled"); |
237 | 237 | } |
238 | 238 | ;'/> |
239 | - <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
239 | + <input type='text' <?php echo ($useAnon == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
240 | 240 | </td> |
241 | 241 | </tr> |
242 | 242 | <tr> |
243 | 243 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
244 | 244 | <td> |
245 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
245 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
246 | 246 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
247 | 247 | </span> |
248 | 248 | </td> |
249 | 249 | <td> |
250 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
250 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "").($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
251 | 251 | if (this.form.elements["checkuser_support"].checked !== true) { |
252 | 252 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
253 | 253 | } else { |
254 | 254 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
255 | 255 | } |
256 | 256 | ;'/> |
257 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
257 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
258 | 258 | </td> |
259 | 259 | </tr> |
260 | 260 | <tr> |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | </td> |
270 | 270 | <td> |
271 | 271 | <input type='checkbox' <?php |
272 | - echo ($verify != FALSE ? "checked" : "" ); |
|
272 | + echo ($verify != FALSE ? "checked" : ""); |
|
273 | 273 | ?> name='verify_support' onclick=' |
274 | 274 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
275 | 275 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -281,12 +281,12 @@ discard block |
||
281 | 281 | </tr> |
282 | 282 | <tr> |
283 | 283 | <td> |
284 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
284 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
285 | 285 | <?php echo _("Enforce exact realm in username"); ?> |
286 | 286 | </span> |
287 | 287 | </td> |
288 | 288 | <td> |
289 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
289 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
290 | 290 | </td> |
291 | 291 | </tr> |
292 | 292 | </table> |
@@ -296,20 +296,20 @@ discard block |
||
296 | 296 | |
297 | 297 | <?php |
298 | 298 | if ($wizardStyle) { |
299 | - echo "<p>" . _("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).") . "</p>"; |
|
299 | + echo "<p>"._("The CAT has a download area for end users. There, they will, for example, learn about the support pointers you entered earlier. The CAT can also immediately offer the installers for the profile for download. If you don't want that, you can instead enter a web site location where you want your users to be redirected to. You, as the administrator, can still download the profiles to place them on that page (see the 'Compatibility Matrix' button on the dashboard).")."</p>"; |
|
300 | 300 | } |
301 | 301 | ?> |
302 | 302 | <p> |
303 | 303 | |
304 | 304 | <?php |
305 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
306 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
305 | + echo "<span id='redirect_label' style='".($realm == "" ? "color:#999999" : "")."'><label for='redirect'>"._("Redirect end users to own web page:")."</label></span> |
|
306 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ")."onclick=' |
|
307 | 307 | if (this.form.elements[\"redirect\"].checked != true) { |
308 | 308 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
309 | 309 | } else { |
310 | 310 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
311 | 311 | };'/> |
312 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
312 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled")."/>"; |
|
313 | 313 | ?> |
314 | 314 | </p> |
315 | 315 | |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | <legend><strong><?php echo _("Supported EAP types"); ?></strong></legend> |
319 | 319 | <?php |
320 | 320 | if ($wizardStyle) { |
321 | - echo "<p>" . _("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.") . "</p>"; |
|
321 | + echo "<p>"._("Now, we need to know which EAP types your IdP supports. If you support multiple EAP types, you can assign every type a priority (1=highest). This tool will always generate an automatic installer for the EAP type with the highest priority; only if the user's device can't use that EAP type, we will use an EAP type further down in the list.")."</p>"; |
|
322 | 322 | } |
323 | 323 | ?> |
324 | 324 | <?php |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | <?php |
352 | 352 | $D = []; |
353 | 353 | foreach ($prefill_methods as $prio => $value) { |
354 | - print '<li>' . $value->getPrintableRep() . "</li>\n"; |
|
354 | + print '<li>'.$value->getPrintableRep()."</li>\n"; |
|
355 | 355 | $D[$value->getPrintableRep()] = $prio; |
356 | 356 | } |
357 | 357 | ?> |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | } |
378 | 378 | $display = $a->getPrintableRep(); |
379 | 379 | if (!isset($D[$a->getPrintableRep()])) { |
380 | - print '<li class="eap1">' . $a->getPrintableRep() . "</li>\n"; |
|
380 | + print '<li class="eap1">'.$a->getPrintableRep()."</li>\n"; |
|
381 | 381 | } |
382 | 382 | } |
383 | 383 | ?> |
@@ -390,8 +390,8 @@ discard block |
||
390 | 390 | foreach ($methods as $a) { |
391 | 391 | $display = $a->getPrintableRep(); |
392 | 392 | $v = isset($D[$display]) ? $D[$display] : ''; |
393 | - print '<input type="hidden" class="eapm" name="' . $display . '" id="EAP-' . $display . '" value="' . $display . '">'; |
|
394 | - print '<input type="hidden" class="eapmv" name="' . $display . '-priority" id="EAP-' . $display . '-priority" value="' . $v . '">'; |
|
393 | + print '<input type="hidden" class="eapm" name="'.$display.'" id="EAP-'.$display.'" value="'.$display.'">'; |
|
394 | + print '<input type="hidden" class="eapmv" name="'.$display.'-priority" id="EAP-'.$display.'-priority" value="'.$v.'">'; |
|
395 | 395 | } |
396 | 396 | ?> |
397 | 397 | <br style="clear:both;" /> |
@@ -411,11 +411,11 @@ discard block |
||
411 | 411 | foreach ($optionsAlreadySet as $optionNames) { |
412 | 412 | if (preg_match("/^support:/", $optionNames)) { |
413 | 413 | $has_support_options[$optionNames] = "SET"; |
414 | - $support_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
414 | + $support_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
415 | 415 | } |
416 | 416 | if (preg_match("/^media:/", $optionNames)) { |
417 | 417 | $has_media_options[$optionNames] = "SET"; |
418 | - $media_text .= "<li><strong>" . $uiElements->displayName($optionNames) . "</strong></li>"; |
|
418 | + $media_text .= "<li><strong>".$uiElements->displayName($optionNames)."</strong></li>"; |
|
419 | 419 | } |
420 | 420 | } |
421 | 421 | $fields = [ |
@@ -424,12 +424,12 @@ discard block |
||
424 | 424 | "media" => _("Media Properties for this profile")]; |
425 | 425 | |
426 | 426 | foreach ($fields as $name => $description) { |
427 | - echo "<fieldset class='option_container' id='" . $name . "_override'> |
|
427 | + echo "<fieldset class='option_container' id='".$name."_override'> |
|
428 | 428 | <legend><strong>$description</strong></legend> |
429 | 429 | <p>"; |
430 | 430 | |
431 | - if (count(${"has_" . $name . "_options"}) > 0) { |
|
432 | - printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_" . $name . "_options"})), "<ul>" . ${$name . "_text"} . "</ul>"); |
|
431 | + if (count(${"has_".$name."_options"}) > 0) { |
|
432 | + printf(ngettext("The option %s is already defined IdP-wide. If you set it here on profile level, this setting will override the IdP-wide one.", "The options %s are already defined IdP-wide. If you set them here on profile level, these settings will override the IdP-wide ones.", count(${"has_".$name."_options"})), "<ul>".${$name."_text"}."</ul>"); |
|
433 | 433 | } |
434 | 434 | |
435 | 435 | echo "</p>"; |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | } |
443 | 443 | |
444 | 444 | if ($wizardStyle) { |
445 | - echo "<p>" . _("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.") . "</p>"; |
|
445 | + echo "<p>"._("When you are sure that everything is correct, please click on 'Save data' and you will be taken to your IdP Dashboard page.")."</p>"; |
|
446 | 446 | } |
447 | -echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>"; |
|
447 | +echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>"; |
|
448 | 448 | echo $deco->footer(); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | namespace core; |
23 | 23 | |
24 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
25 | 25 | |
26 | 26 | $instMgmt = new \core\UserManagement(); |
27 | 27 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
62 | 62 | <tr> |
63 | 63 | <td> |
64 | - <?php echo "" . _("Unique Identifier") ?> |
|
64 | + <?php echo ""._("Unique Identifier") ?> |
|
65 | 65 | </td> |
66 | 66 | <td> |
67 | 67 | </td> |
@@ -74,14 +74,14 @@ discard block |
||
74 | 74 | <div> |
75 | 75 | <?php |
76 | 76 | if (\config\Master::DB['USER']['readonly'] === FALSE) { |
77 | - echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>"; |
|
77 | + echo "<a href='edit_user.php'><button>"._("Edit User Details")."</button></a>"; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | if ($user->isFederationAdmin()) { |
81 | - echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed) . "</button></form>"; |
|
81 | + echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>".sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed)."</button></form>"; |
|
82 | 82 | } |
83 | 83 | if ($user->isSuperadmin()) { |
84 | - echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; |
|
84 | + echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>"._('Click here to access the superadmin page')."</button></form>"; |
|
85 | 85 | } |
86 | 86 | ?> |
87 | 87 | </div> |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
95 | 95 | $target = "https://wiki.geant.org/x/6Zg7Bw"; // Managed IdP manual |
96 | 96 | } |
97 | - $helptext = "<h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst) . "</h3>"; |
|
97 | + $helptext = "<h3 style='display:inline;'>".sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst)."</h3>"; |
|
98 | 98 | } else { |
99 | 99 | $helptext = ""; |
100 | 100 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | // we need to run the Federation constructor |
104 | 104 | $cat = new \core\CAT; |
105 | 105 | /// first parameter: number of Identity Providers; second param is the literal configured term for 'Identity Provider' (you may or may not be able to add a plural suffix for your locale) |
106 | - echo "<h2>" . sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureParticipant) . "</h2>"; |
|
106 | + echo "<h2>".sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureParticipant)."</h2>"; |
|
107 | 107 | $instlist = []; |
108 | 108 | $my_idps = []; |
109 | 109 | $myFeds = []; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $coadmin = new \core\User($username['ID']); |
175 | 175 | $coadmin_name = $coadmin->getAttributes('user:realname'); |
176 | 176 | if (count($coadmin_name) > 0) { |
177 | - echo $coadmin_name[0]['value'] . "<br/>"; |
|
177 | + echo $coadmin_name[0]['value']."<br/>"; |
|
178 | 178 | unset($admins[$number]); |
179 | 179 | } |
180 | 180 | } else { // don't list self |
@@ -193,14 +193,14 @@ discard block |
||
193 | 193 | <td> |
194 | 194 | <?php |
195 | 195 | if ($blessedUser && \config\Master::DB['INST']['readonly'] === FALSE) { |
196 | - echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>"; |
|
196 | + echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>"._("Add/Remove Administrators")."</button></form></div>"; |
|
197 | 197 | } |
198 | 198 | ?> |
199 | 199 | </td> |
200 | 200 | <td> <!-- danger zone --> |
201 | 201 | |
202 | 202 | <form action='edit_participant_result.php?inst_id=<?php echo $the_inst->identifier; ?>' method='post' accept-charset='UTF-8'> |
203 | - <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo ( \config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed) . " " : "" ) . sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureParticipant); ?></button> |
|
203 | + <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_DELETE; ?>' onclick="return confirm('<?php echo (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL ? sprintf(_("After deleting the %s, you can not recreate it yourself - you need a new invitation token from the %s administrator!"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed)." " : "").sprintf(_("Do you really want to delete your %s %s?"), $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Delete %s"), $uiElements->nomenclatureParticipant); ?></button> |
|
204 | 204 | </form> |
205 | 205 | <form action='edit_participant_result.php?inst_id=<?php echo $the_inst->identifier; ?>' method='post' accept-charset='UTF-8'> |
206 | 206 | <button class='delete' type='submit' name='submitbutton' value='<?php echo \web\lib\common\FormElements::BUTTON_FLUSH_AND_RESTART; ?>' onclick="return confirm('<?php echo sprintf(_("This action will delete all properties of the %s and start over the configuration from scratch. Do you really want to reset all settings of the %s %s?"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureParticipant, $the_inst->name); ?>')"><?php echo sprintf(_("Reset all %s settings"), $uiElements->nomenclatureParticipant); ?></button> |
@@ -215,18 +215,18 @@ discard block |
||
215 | 215 | <?php |
216 | 216 | } |
217 | 217 | } else { |
218 | - echo "<h2>" . sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst) . "</h2>"; |
|
218 | + echo "<h2>".sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst)."</h2>"; |
|
219 | 219 | } |
220 | 220 | if (\config\Master::DB['INST']['readonly'] === FALSE) { |
221 | 221 | if (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === NULL) { |
222 | - echo "<p>" . sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant) . "</p>"; |
|
222 | + echo "<p>".sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant)."</p>"; |
|
223 | 223 | echo "<hr/> |
224 | 224 | <div style='white-space: nowrap;'> |
225 | 225 | <form action='action_enrollment.php' method='get' accept-charset='UTF-8'>" . |
226 | - sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureParticipant) . |
|
226 | + sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureParticipant). |
|
227 | 227 | " <input type='text' id='token' name='token'/> |
228 | 228 | <button type='submit'>" . |
229 | - _("Go!") . " |
|
229 | + _("Go!")." |
|
230 | 230 | </button> |
231 | 231 | </form> |
232 | 232 | </div>"; |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | <div style='white-space: nowrap;'> |
236 | 236 | <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'> |
237 | 237 | <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" . |
238 | - sprintf(_("New %s Registration"), $uiElements->nomenclatureParticipant) . " |
|
238 | + sprintf(_("New %s Registration"), $uiElements->nomenclatureParticipant)." |
|
239 | 239 | </button> |
240 | 240 | </form> |
241 | 241 | </div>"; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | ?> |
28 | 28 | <?php |
29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
30 | 30 | |
31 | 31 | $deco = new \web\lib\admin\PageDecoration(); |
32 | 32 | $validator = new \web\lib\common\InputValidation(); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | if (!isset($_GET['deployment_id'])) { |
39 | 39 | if (isset($_POST['consortium']) && count($myfed->getAttributes("fed:openroaming")) > 0) { |
40 | 40 | $my_inst->newDeployment(\core\AbstractDeployment::DEPLOYMENTTYPE_MANAGED, $_POST['consortium']); |
41 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier); |
|
41 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier); |
|
42 | 42 | exit(0); |
43 | 43 | } else { |
44 | 44 | throw new Exception("Desired consortium for Managed SP needs to be specified, and allowed!"); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if (in_array('OK', $response)) { |
54 | 54 | $deployment->deactivate(); |
55 | 55 | } |
56 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
56 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
57 | 57 | exit(0); |
58 | 58 | } |
59 | 59 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | if (in_array('OK', $response)) { |
63 | 63 | $deployment->activate(); |
64 | 64 | } |
65 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
65 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
66 | 66 | exit(0); |
67 | 67 | } |
68 | 68 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $deployment->status = core\DeploymentManaged::INACTIVE; |
84 | 84 | $response = $deployment->setRADIUSconfig(); |
85 | 85 | } |
86 | - header("Location: overview_org.php?inst_id=" . $my_inst->identifier . '&' . urldecode(http_build_query($response))); |
|
86 | + header("Location: overview_org.php?inst_id=".$my_inst->identifier.'&'.urldecode(http_build_query($response))); |
|
87 | 87 | exit(0); |
88 | 88 | } |
89 | 89 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | echo $uiElements->instLevelInfoBoxes($my_inst); |
112 | 112 | $deploymentOptions = $deployment->getAttributes(); |
113 | 113 | echo "<form enctype='multipart/form-data' action='edit_hotspot.php?inst_id=$my_inst->identifier&deployment_id=$deployment->identifier' method='post' accept-charset='UTF-8'> |
114 | - <input type='hidden' name='MAX_FILE_SIZE' value='" . \config\Master::MAX_UPLOAD_SIZE . "'>"; |
|
114 | + <input type='hidden' name='MAX_FILE_SIZE' value='".\config\Master::MAX_UPLOAD_SIZE."'>"; |
|
115 | 115 | $optionDisplay = new \web\lib\admin\OptionDisplay($deploymentOptions, \core\Options::LEVEL_PROFILE); |
116 | 116 | ?> |
117 | 117 | <fieldset class='option_container' id='managedsp_override'> |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | <!-- input for VLAN identifier for home users--> |
144 | 144 | <td> |
145 | 145 | <span id='vlan_label'> |
146 | -<?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " " . _("(unset with '0')"))); ?> |
|
146 | +<?php echo sprintf(_("VLAN tag for own users%s:"), ($vlan === NULL ? "" : " "._("(unset with '0')"))); ?> |
|
147 | 147 | </span> |
148 | 148 | </td> |
149 | 149 | <td> |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | </fieldset> |
164 | 164 | |
165 | 165 | <?php |
166 | - echo "<p><button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_SAVE . "'>" . _("Save data") . "</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>" . _("Discard changes") . "</button></p></form>"; |
|
166 | + echo "<p><button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_SAVE."'>"._("Save data")."</button><button type='button' class='delete' name='abortbutton' value='abort' onclick='javascript:window.location = \"overview_org.php?inst_id=$my_inst->identifier\"'>"._("Discard changes")."</button></p></form>"; |
|
167 | 167 | echo $deco->footer(); |
168 | 168 | |
169 | 169 | |
170 | 170 | \ No newline at end of file |