@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * @author Zilvinas Vaira |
12 | 12 | * |
13 | 13 | */ |
14 | -class GetTokenEmailDetails extends AbstractAjaxCommand{ |
|
14 | +class GetTokenEmailDetails extends AbstractAjaxCommand { |
|
15 | 15 | |
16 | 16 | const COMMAND = "gettokenemaildetails"; |
17 | 17 | const PARAM_TOKENLINK = "tokenlink"; |
@@ -25,16 +25,16 @@ discard block |
||
25 | 25 | * @param string $commandToken |
26 | 26 | * @param DefaultContext $context |
27 | 27 | */ |
28 | - public function __construct($commandToken, $context){ |
|
28 | + public function __construct($commandToken, $context) { |
|
29 | 29 | parent::__construct($commandToken, $context); |
30 | 30 | $this->subject = sprintf(_("Your %s access is ready"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
31 | - $this->body = _("Hello!"); |
|
31 | + $this->body = _("Hello!"); |
|
32 | 32 | $this->body .= "\n\n"; |
33 | - $this->body .= sprintf(_("A new %s access credential has been created for you by your network administrator."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
33 | + $this->body .= sprintf(_("A new %s access credential has been created for you by your network administrator."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
34 | 34 | $this->body .= " "; |
35 | 35 | $this->body .= sprintf(_("Please follow the following link with the device you want to enable for %s to get a custom %s installation program just for you. You can click on the link, copy and paste it into a browser or scan the attached QR code."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
36 | 36 | $this->body .= "\n\n%s\n\n"; // gets replaced with the token value by getBody() |
37 | - $this->body .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
37 | + $this->body .= sprintf(_("Please keep this email or bookmark this link for future use. After picking up your %s installation program, you can use the same link to get status information about your %s account."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
38 | 38 | $this->body .= "\n\n"; |
39 | 39 | $this->body .= _("Regards,"); |
40 | 40 | $this->body .= "\n\n"; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @return string |
47 | 47 | */ |
48 | - public function getSubject(){ |
|
48 | + public function getSubject() { |
|
49 | 49 | return $this->subject; |
50 | 50 | } |
51 | 51 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @param string $invitationToken |
55 | 55 | * @return string |
56 | 56 | */ |
57 | - public function getBody($invitationToken){ |
|
57 | + public function getBody($invitationToken) { |
|
58 | 58 | return sprintf($this->body, $invitationToken); |
59 | 59 | } |
60 | 60 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * @see \web\lib\admin\http\AbstractCommand::execute() |
65 | 65 | */ |
66 | 66 | public function execute() { |
67 | - if(isset($_POST[self::PARAM_TOKENLINK])){ |
|
67 | + if (isset($_POST[self::PARAM_TOKENLINK])) { |
|
68 | 68 | |
69 | 69 | $invitationToken = $this->parseString($_POST[self::PARAM_TOKENLINK]); |
70 | 70 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $tokenTag = new Tag('email'); |
74 | 74 | $tokenTag->addAttribute('subject', $this->getSubject()); |
75 | - $bytestream = $uiELements->pngInjectConsortiumLogo(\QRcode::png($invitationToken, FALSE, QR_ECLEVEL_Q, 12),12); |
|
75 | + $bytestream = $uiELements->pngInjectConsortiumLogo(\QRcode::png($invitationToken, FALSE, QR_ECLEVEL_Q, 12), 12); |
|
76 | 76 | $tokenTag->addAttribute('image', "data:image/png;base64," . base64_encode($bytestream)); |
77 | 77 | $tokenTag->addText($this->getBody($invitationToken)); |
78 | 78 |
@@ -185,7 +185,6 @@ |
||
185 | 185 | * - RETVAL_NOTCONFIGURED; needs CONFIG_DIAGNOSTICS['RADIUSTESTS']['TLS-discoverytag'] |
186 | 186 | * - RETVAL_INVALID (at least one format error) |
187 | 187 | * - RETVAL_OK (all fine) |
188 | - |
|
189 | 188 | * @return int one of two RETVALs above |
190 | 189 | */ |
191 | 190 | public function relevantNAPTRcompliance() { |
@@ -52,6 +52,9 @@ discard block |
||
52 | 52 | */ |
53 | 53 | const PRODUCTNAME = "Managed IdP"; |
54 | 54 | |
55 | + /** |
|
56 | + * @param integer $length |
|
57 | + */ |
|
55 | 58 | public static function randomString( |
56 | 59 | $length, $keyspace = '23456789abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' |
57 | 60 | ) { |
@@ -183,6 +186,7 @@ discard block |
||
183 | 186 | /** |
184 | 187 | * create a CSR |
185 | 188 | * |
189 | + * @param resource $privateKey |
|
186 | 190 | * @return |
187 | 191 | */ |
188 | 192 | private function generateCsr($privateKey) { |
@@ -221,6 +225,7 @@ discard block |
||
221 | 225 | * take a CSR and sign it with our issuing CA's certificate |
222 | 226 | * |
223 | 227 | * @param $csr the CSR |
228 | + * @param integer $expiryDays |
|
224 | 229 | */ |
225 | 230 | private function signCsr($csr, $expiryDays) { |
226 | 231 | switch (CONFIG_CONFASSISTANT['SILVERBULLET']['CA']['type']) { |
@@ -140,27 +140,27 @@ discard block |
||
140 | 140 | $this->loggerInstance->debug(3, "--- END Constructing new Profile object ... ---\n"); |
141 | 141 | |
142 | 142 | $this->termsAndConditions = "<h2>Product Definition</h2> |
143 | - <p>". \core\ProfileSilverbullet::PRODUCTNAME." outsources the technical setup of ".CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] ." ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution']." functions to the " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " Operations Team. The system includes</p> |
|
143 | + <p>". \core\ProfileSilverbullet::PRODUCTNAME . " outsources the technical setup of " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " functions to the " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " Operations Team. The system includes</p> |
|
144 | 144 | <ul> |
145 | 145 | <li>a web-based user management interface where user accounts and access credentials can be created and revoked (there is a limit to the number of active users)</li> |
146 | 146 | <li>a technical infrastructure ('CA') which issues and revokes credentials</li> |
147 | - <li>a technical infrastructure ('RADIUS') which verifies access credentials and subsequently grants access to " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] ."</li> |
|
147 | + <li>a technical infrastructure ('RADIUS') which verifies access credentials and subsequently grants access to " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . "</li> |
|
148 | 148 | <li><span style='color: red;'>TBD: a lookup/notification system which informs you of network abuse complaints by " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " Service Providers that pertain to your users</span></li> |
149 | 149 | </ul> |
150 | 150 | <h2>User Account Liability</h2> |
151 | - <p>As an " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] ." ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] ." administrator using this system, you are authorized to create user accounts according to your local " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " policy. You are fully responsible for the accounts you issue and are the data controller for all user information you deposit in this system; the system is a data processor.</p>"; |
|
151 | + <p>As an " . CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'] . " " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " administrator using this system, you are authorized to create user accounts according to your local " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " policy. You are fully responsible for the accounts you issue and are the data controller for all user information you deposit in this system; the system is a data processor.</p>"; |
|
152 | 152 | $this->termsAndConditions .= "<p>Your responsibilities include that you</p> |
153 | 153 | <ul> |
154 | 154 | <li>only issue accounts to members of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . ", as defined by your local policy.</li> |
155 | 155 | <li>must make sure that all accounts that you issue can be linked by you to actual human end users</li> |
156 | - <li>have to immediately revoke accounts of users when they leave or otherwise stop being a member of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] ."</li> |
|
156 | + <li>have to immediately revoke accounts of users when they leave or otherwise stop being a member of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . "</li> |
|
157 | 157 | <li>will act upon notifications about possible network abuse by your users and will appropriately sanction them</li> |
158 | 158 | </ul> |
159 | 159 | <p>"; |
160 | - $this->termsAndConditions .= "Failure to comply with these requirements may make your ".CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation']." act on your behalf, which you authorise, and will ultimately lead to the deletion of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " (and all the users you create inside) in this system."; |
|
160 | + $this->termsAndConditions .= "Failure to comply with these requirements may make your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_federation'] . " act on your behalf, which you authorise, and will ultimately lead to the deletion of your " . CONFIG_CONFASSISTANT['CONSORTIUM']['nomenclature_institution'] . " (and all the users you create inside) in this system."; |
|
161 | 161 | $this->termsAndConditions .= "</p> |
162 | 162 | <h2>Privacy</h2> |
163 | - <p>With " . \core\ProfileSilverbullet::PRODUCTNAME .", we are necessarily storing personally identifiable information about the end users you create. While the actual human is only identifiable with your help, we consider all the user data as relevant in terms of privacy jurisdiction. Please note that</p> |
|
163 | + <p>With " . \core\ProfileSilverbullet::PRODUCTNAME . ", we are necessarily storing personally identifiable information about the end users you create. While the actual human is only identifiable with your help, we consider all the user data as relevant in terms of privacy jurisdiction. Please note that</p> |
|
164 | 164 | <ul> |
165 | 165 | <li>You are the only one who needs to be able to make a link to the human behind the usernames you create. The usernames you create in the system have to be rich enough to allow you to make that identification step. Also consider situations when you are unavailable or leave the organisation and someone else needs to perform the matching to an individual.</li> |
166 | 166 | <li>The identifiers we create in the credentials are not linked to the usernames you add to the system; they are randomly generated pseudonyms.</li> |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | if (!$invitationsResult || $invitationsResult->num_rows == 0) { |
542 | 542 | $loggerInstance->debug(2, "Token $tokenvalue not found in database or database query error!\n"); |
543 | 543 | return ["status" => self::SB_TOKENSTATUS_INVALID, |
544 | - "cert_status" => [],]; |
|
544 | + "cert_status" => [], ]; |
|
545 | 545 | } |
546 | 546 | // if not returned, we found the token in the DB |
547 | 547 | $invitationRow = mysqli_fetch_object($invitationsResult); |
@@ -206,13 +206,13 @@ discard block |
||
206 | 206 | if(j.local_url !== undefined && j.local_url) |
207 | 207 | txt = txt+'<tr><td><?php escaped_echo(_("WWW:")); ?></td><td><a href="'+j.local_url+'" target="_blank">'+j.local_url+'</a></td></tr>'; |
208 | 208 | if(j.local_email !== undefined && j.local_email) |
209 | - txt = txt+'<tr><td><?php escaped_echo(_("email:"));?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
209 | + txt = txt+'<tr><td><?php escaped_echo(_("email:")); ?></td><td><a href=mailto:"'+j.local_email+'">'+j.local_email+'</a></td></tr>'; |
|
210 | 210 | if(j.local_phone !== undefined && j.local_phone) |
211 | - txt = txt+'<tr><td><?php escaped_echo(_("tel:"));?></td><td>'+j.local_phone+'</td></tr>'; |
|
211 | + txt = txt+'<tr><td><?php escaped_echo(_("tel:")); ?></td><td>'+j.local_phone+'</td></tr>'; |
|
212 | 212 | if(txt) |
213 | - txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"),$cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>'; |
|
213 | + txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems, then you can obtain direct assistance from your %s at:"), $cat->nomenclature_inst)); ?></th></tr>"+txt+'</table>'; |
|
214 | 214 | else |
215 | - txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"),$cat->nomenclature_inst)); ?>.</th></tr></table>"; |
|
215 | + txt = "<table><tr><th colspan='2'><?php escaped_echo(sprintf(_("If you encounter problems you should ask for help at your %s"), $cat->nomenclature_inst)); ?>.</th></tr></table>"; |
|
216 | 216 | $("#user_info").html(txt); |
217 | 217 | $("#user_info").show(); |
218 | 218 | resetDevices(); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $("#g_"+v.id).addClass('alertButton'); |
226 | 226 | $("#cross_icon_"+v.id).show(); |
227 | 227 | $("#"+v.id).addClass('disabledDevice'); |
228 | - $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"); |
|
228 | + $("#download_button_header_"+v.id).html("<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"); |
|
229 | 229 | $("#info_b_"+v.id+",#g_info_b_"+v.id).hide(); |
230 | 230 | } else { |
231 | 231 | if(v.status == -1) |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
238 | 238 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
239 | 239 | i_div = $("#info_"+$(this).attr('id')); |
240 | - t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue"));?></a></span>"; |
|
240 | + t = "<?php escaped_echo(_("Your site administrator has specified that this device should be configured with resources located on a local page. When you click <b>Continue</b> this page will be opened in a new window/tab."))?>"+"<br><span class='redirect_link'><a href='"+v.redirect+"' target='_blank'><?php escaped_echo(_("Continue")); ?></a></span>"; |
|
241 | 241 | i_div.html(t); |
242 | 242 | $(".redirect_link").click(function(event) { |
243 | 243 | i_div.hide(); |
@@ -245,13 +245,13 @@ discard block |
||
245 | 245 | |
246 | 246 | }); |
247 | 247 | } else if(v.device_customtext != '0' || v.eap_customtext != '0' || v.message != '0' || v.status > 0) { |
248 | - var continue_text = "<?php escaped_echo(_("Continue"));?>"; |
|
248 | + var continue_text = "<?php escaped_echo(_("Continue")); ?>"; |
|
249 | 249 | $("#"+v.id+",#g_"+v.id).addClass('additionalInfo'); |
250 | 250 | $("#"+v.id+",#g_"+v.id).click(function(event){ |
251 | 251 | i_div = $("#info_"+$(this).attr('id')); |
252 | 252 | if(v.status > 0) { |
253 | - t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"),$cat->nomenclature_inst))?>"; |
|
254 | - continue_text = "<?php escaped_echo(_("Close"));?>"; |
|
253 | + t = "<?php escaped_echo(sprintf(_("This device cannot be configured with settings provided by your %s"), $cat->nomenclature_inst))?>"; |
|
254 | + continue_text = "<?php escaped_echo(_("Close")); ?>"; |
|
255 | 255 | } else { |
256 | 256 | t = i_div.html(); |
257 | 257 | if(v.message != '0') { |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | } |
307 | 307 | |
308 | 308 | function infoCAT(k,subK,title) { |
309 | - $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE","user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) { |
|
309 | + $.post('<?php echo $Gui->skinObject->findResourceUrl("BASE", "user/cat_info.php")?>', {page: k, subpage: subK, lang: lang}, function(data) { |
|
310 | 310 | if(data.substring(0,8) == 'no_title') { |
311 | 311 | data = data.substring(8,data.length); |
312 | 312 | } else { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | $("#loading_ico").css('left',x+'px'); |
330 | 330 | $("#loading_ico").attr('src','resources/images/icons/loading9.gif'); |
331 | 331 | $("#loading_ico").show(); |
332 | - window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE","admin/overview_user.php")?>?lang="+lang); |
|
332 | + window.location.replace("<?php echo $Gui->skinObject->findResourceUrl("BASE", "admin/overview_user.php")?>?lang="+lang); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | return(Math.round(windowWidth/2)); |
352 | 352 | } |
353 | 353 | |
354 | -<?php if($idpId) { |
|
354 | +<?php if ($idpId) { |
|
355 | 355 | print "front_page = 0;\n"; |
356 | 356 | } ?> |
357 | 357 | |
@@ -476,13 +476,13 @@ discard block |
||
476 | 476 | "overlay":true,"cookie":true,"type":false, |
477 | 477 | "country":true,"location":true, |
478 | 478 | "title":"<?php escaped_echo($cat->nomenclature_inst) ?>", |
479 | - "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"),$cat->nomenclature_inst)) ?>", |
|
480 | - "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"),$cat->nomenclature_inst)) ?>", |
|
481 | - "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>", |
|
479 | + "subtitle":"<?php escaped_echo(sprintf(_("Select your <strong>%s<\/strong>"), $cat->nomenclature_inst)) ?>", |
|
480 | + "textHelp": "<?php escaped_echo(sprintf(_("Help, my %s is not on the list"), $cat->nomenclature_inst)) ?>", |
|
481 | + "textHelpMore": "<?php escaped_echo(sprintf(_("This system relies on information supplied by local %s administrators. If your %s is not on the list, then nag them to add information to the %s database."), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $cat->nomenclature_inst, CONFIG['APPEARANCE']['productname'])); ?>", |
|
482 | 482 | "textLocateMe": "<?php escaped_echo(_("Locate me more accurately using HTML5 Geo-Location")) ?>", |
483 | 483 | "textShowProviders": "<?php escaped_echo(sprintf(_("Show %ss in"), $cat->nomenclature_inst)) ?>", |
484 | 484 | "textAllCountries": "<?php escaped_echo(_("all countries")) ?>", |
485 | - "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"),$cat->nomenclature_inst)) ?>", |
|
485 | + "textSearch" : "<?php escaped_echo(sprintf(_("or search for an %s, in example Univerity of Oslo"), $cat->nomenclature_inst)) ?>", |
|
486 | 486 | "textShowAllCountries": "<?php escaped_echo(_("show all countries")) ?>", |
487 | 487 | "textLimited1" : "<?php escaped_echo(_("Results limited to"))?>", |
488 | 488 | "textLimited2" : "<?php escaped_echo(_("entries - show more"))?>", |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | </td> |
280 | 280 | <td> |
281 | 281 | <input type='checkbox' <?php |
282 | - echo ($verify != FALSE ? "checked" : "" ); |
|
282 | + echo ($verify != FALSE ? "checked" : ""); |
|
283 | 283 | ?> name='verify_support' onclick=' |
284 | 284 | if (this.form.elements["verify_support"].checked !== true || this.form.elements["realm"].value.length == 0) { |
285 | 285 | this.form.elements["hint_support"].setAttribute("disabled", "disabled"); |
@@ -287,48 +287,48 @@ discard block |
||
287 | 287 | this.form.elements["hint_support"].removeAttribute("disabled"); |
288 | 288 | } |
289 | 289 | ;'/> |
290 | - <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
290 | + <span id='hint_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
291 | 291 | <?php echo _("Prefill user input with realm suffix:"); ?> |
292 | 292 | </span> |
293 | - <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : "" ); ?> name='hint_support' <?php echo ( $hint != FALSE ? "checked" : "" ); ?> /> |
|
293 | + <input type='checkbox' <?php echo ($verify == FALSE ? "disabled" : ""); ?> name='hint_support' <?php echo ($hint != FALSE ? "checked" : ""); ?> /> |
|
294 | 294 | </td> |
295 | 295 | </tr> |
296 | 296 | <tr> |
297 | 297 | |
298 | 298 | <!-- checkbox and input field for anonymity support, available only when realm is known--> |
299 | 299 | <td> |
300 | - <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
300 | + <span id='anon_support_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
301 | 301 | <?php echo _("Enable Anonymous Outer Identity:"); ?> |
302 | 302 | </span> |
303 | 303 | </td> |
304 | 304 | <td> |
305 | - <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='anon_support' onclick=' |
|
305 | + <input type='checkbox' <?php echo ($useAnon != FALSE ? "checked" : "") . ($realm == "" ? " disabled" : ""); ?> name='anon_support' onclick=' |
|
306 | 306 | if (this.form.elements["anon_support"].checked !== true) { |
307 | 307 | this.form.elements["anon_local"].setAttribute("disabled", "disabled"); |
308 | 308 | } else { |
309 | 309 | this.form.elements["anon_local"].removeAttribute("disabled"); |
310 | 310 | } |
311 | 311 | ;'/> |
312 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
312 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='anon_local' value='<?php echo $anonLocal; ?>'/> |
|
313 | 313 | </td> |
314 | 314 | </tr> |
315 | 315 | <tr> |
316 | 316 | |
317 | 317 | <!-- checkbox and input field for check realm outer id, available only when realm is known--> |
318 | 318 | <td> |
319 | - <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : "" ); ?>'> |
|
319 | + <span id='checkuser_label' style='<?php echo ($realm == "" ? "color:#999999" : ""); ?>'> |
|
320 | 320 | <?php echo _("Use special Outer Identity for realm checks:"); ?> |
321 | 321 | </span> |
322 | 322 | </td> |
323 | 323 | <td> |
324 | - <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "" ) . ($realm == "" ? " disabled" : "" ); ?> name='checkuser_support' onclick=' |
|
324 | + <input type='checkbox' <?php echo ($checkuserOuter != FALSE ? "checked" : "") . ($realm == "" ? " disabled" : ""); ?> name='checkuser_support' onclick=' |
|
325 | 325 | if (this.form.elements["checkuser_support"].checked !== true) { |
326 | 326 | this.form.elements["checkuser_local"].setAttribute("disabled", "disabled"); |
327 | 327 | } else { |
328 | 328 | this.form.elements["checkuser_local"].removeAttribute("disabled"); |
329 | 329 | } |
330 | 330 | ;'/> |
331 | - <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : "" ); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
331 | + <input type='text' <?php echo ($checkuserOuter == FALSE ? "disabled" : ""); ?> name='checkuser_local' value='<?php echo $checkuserValue; ?>'/> |
|
332 | 332 | </td> |
333 | 333 | </tr> |
334 | 334 | </table> |
@@ -344,14 +344,14 @@ discard block |
||
344 | 344 | <p> |
345 | 345 | |
346 | 346 | <?php |
347 | - echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "" ) . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
348 | - <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked " ) . "onclick=' |
|
347 | + echo "<span id='redirect_label' style='" . ($realm == "" ? "color:#999999" : "") . "'><label for='redirect'>" . _("Redirect end users to own web page:") . "</label></span> |
|
348 | + <input type='checkbox' name='redirect' id='redirect' " . ($blacklisted === FALSE ? "" : "checked ") . "onclick=' |
|
349 | 349 | if (this.form.elements[\"redirect\"].checked != true) { |
350 | 350 | this.form.elements[\"redirect_target\"].setAttribute(\"disabled\", \"disabled\"); |
351 | 351 | } else { |
352 | 352 | this.form.elements[\"redirect_target\"].removeAttribute(\"disabled\"); |
353 | 353 | };'/> |
354 | - <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled" ) . "/>"; |
|
354 | + <input type='text' name='redirect_target' " . ($blacklisted !== FALSE ? "value='$blacklisted'" : "disabled") . "/>"; |
|
355 | 355 | ?> |
356 | 356 | </p> |
357 | 357 | |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | function priority(string $eapType, bool $isenabled, int $priority) { |
376 | 376 | echo "<td><select id='$eapType-priority' name='$eapType-priority' " . (!$isenabled ? "disabled='disabled'" : "") . ">"; |
377 | 377 | for ($a = 1; $a < 7; $a = $a + 1) { |
378 | - echo "<option id='$eapType-$a' value='$a' " . ( $isenabled && $a == $priority ? "selected" : "" ) . ">$a</option>"; |
|
378 | + echo "<option id='$eapType-$a' value='$a' " . ($isenabled && $a == $priority ? "selected" : "") . ">$a</option>"; |
|
379 | 379 | } |
380 | 380 | echo "</select></td>"; |
381 | 381 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'getUserCerts', |
40 | 40 | ]; |
41 | 41 | |
42 | -function getRequest($varName,$filter) { |
|
42 | +function getRequest($varName, $filter) { |
|
43 | 43 | $safeText = ["options"=>["regexp"=>"/^[\w\d-]+$/"]]; |
44 | 44 | switch ($filter) { |
45 | 45 | case 'safe_text': |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | // make sure this is a known action |
59 | 59 | $actionR = getRequest('action', 'safe_text'); |
60 | -$action = array_search($actionR,LISTOFACTIONS) ? $actionR : FALSE; |
|
60 | +$action = array_search($actionR, LISTOFACTIONS) ? $actionR : FALSE; |
|
61 | 61 | if ($action === FALSE) { |
62 | 62 | exit; |
63 | 63 | } |
@@ -65,18 +65,18 @@ discard block |
||
65 | 65 | $lang = $langR ? $validator->supportedLanguage($langR) : FALSE; |
66 | 66 | $deviceR = getRequest('device', 'safe_text'); |
67 | 67 | $device = $deviceR ? $validator->Device($deviceR) : FALSE; |
68 | -$idpR = getRequest('idp','int'); |
|
68 | +$idpR = getRequest('idp', 'int'); |
|
69 | 69 | $idp = $idpR ? $validator->IdP($idpR)->identifier : FALSE; |
70 | -$profileR = getRequest('profile','int'); |
|
70 | +$profileR = getRequest('profile', 'int'); |
|
71 | 71 | $profile = $profileR ? $validator->Profile($profileR)->identifier : FALSE; |
72 | -$federationR = getRequest('federation','safe_text'); |
|
72 | +$federationR = getRequest('federation', 'safe_text'); |
|
73 | 73 | $federation = $federationR ? $validator->Federation($deviceR)->identifier : FALSE; |
74 | -$disco = getRequest('disco','int'); |
|
75 | -$width = getRequest('width','int') ?? 0; |
|
76 | -$height = getRequest('height','int') ?? 0; |
|
77 | -$sort = getRequest('sort','int') ?? 0; |
|
78 | -$generatedforR = getRequest('generatedfor','safe_text') ?? 'user'; |
|
79 | -$token = getRequest('token','safe_text'); |
|
74 | +$disco = getRequest('disco', 'int'); |
|
75 | +$width = getRequest('width', 'int') ?? 0; |
|
76 | +$height = getRequest('height', 'int') ?? 0; |
|
77 | +$sort = getRequest('sort', 'int') ?? 0; |
|
78 | +$generatedforR = getRequest('generatedfor', 'safe_text') ?? 'user'; |
|
79 | +$token = getRequest('token', 'safe_text'); |
|
80 | 80 | |
81 | 81 | |
82 | 82 | switch ($action) { |