@@ -97,8 +97,7 @@ |
||
| 97 | 97 | // does the file exist in the current skin's directory? Has precedence |
| 98 | 98 | if ($submodule !== '' && file_exists(__DIR__ . "/../../skins/" . $this->skin . "/" . $submodule . $path . $filename)) { |
| 99 | 99 | $extrapath = "/skins/" . $this->skin . "/" . $submodule; |
| 100 | - } |
|
| 101 | - elseif (file_exists(__DIR__ . "/../../skins/" . $this->skin . $path . $filename)) { |
|
| 100 | + } elseif (file_exists(__DIR__ . "/../../skins/" . $this->skin . $path . $filename)) { |
|
| 102 | 101 | $extrapath = "/skins/" . $this->skin; |
| 103 | 102 | } elseif (file_exists(__DIR__ . "/../../" . $path . $filename)) { |
| 104 | 103 | $extrapath = ""; |
@@ -201,8 +201,7 @@ |
||
| 201 | 201 | |
| 202 | 202 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { |
| 203 | 203 | $configRaw['use_other_tls_id'] = "True"; |
| 204 | - } |
|
| 205 | - else { |
|
| 204 | + } else { |
|
| 206 | 205 | $configRaw['use_other_tls_id'] = "False"; |
| 207 | 206 | } |
| 208 | 207 | |
@@ -607,8 +607,7 @@ |
||
| 607 | 607 | $output = json_encode(["result" => "SUCCESS", "details" => $details], JSON_PRETTY_PRINT); |
| 608 | 608 | if ($output === FALSE) { |
| 609 | 609 | $this->returnError(API::ERROR_INTERNAL_ERROR, "Unable to JSON encode return data: ". json_last_error(). " - ". json_last_error_msg()); |
| 610 | - } |
|
| 611 | - else { |
|
| 610 | + } else { |
|
| 612 | 611 | echo $output; |
| 613 | 612 | } |
| 614 | 613 | } |
@@ -203,8 +203,7 @@ |
||
| 203 | 203 | |
| 204 | 204 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { |
| 205 | 205 | $configRaw['USE_OTHER_TLS_ID'] = true; |
| 206 | - } |
|
| 207 | - else { |
|
| 206 | + } else { |
|
| 208 | 207 | $configRaw['USE_OTHER_TLS_ID'] = false; |
| 209 | 208 | } |
| 210 | 209 | |
@@ -755,7 +755,22 @@ |
||
| 755 | 755 | } |
| 756 | 756 | ?> |
| 757 | 757 | <div id="tabs-<?php echo $i;?>"> |
| 758 | - <button id="run_<?php if ($i==3) echo 'd'; else echo 'o';?>_tests"; onclick="run_<?php if ($i==3) echo 'dynamic'; else echo 'openroaming';?>()"><?php if ($i==3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests");?></button> |
|
| 758 | + <button id="run_<?php if ($i==3) { |
|
| 759 | + echo 'd'; |
|
| 760 | +} else { |
|
| 761 | + echo 'o'; |
|
| 762 | +} |
|
| 763 | +?>_tests"; onclick="run_<?php if ($i==3) { |
|
| 764 | + echo 'dynamic'; |
|
| 765 | +} else { |
|
| 766 | + echo 'openroaming'; |
|
| 767 | +} |
|
| 768 | +?>()"><?php if ($i==3) { |
|
| 769 | + echo _("Repeat dynamic connectivity tests"); |
|
| 770 | +} else { |
|
| 771 | + echo _("Repeat OpenRoaming connectivity tests"); |
|
| 772 | +} |
|
| 773 | +?></button> |
|
| 759 | 774 | |
| 760 | 775 | <?php |
| 761 | 776 | echo "<div id='"; |
@@ -257,9 +257,7 @@ discard block |
||
| 257 | 257 | </button> |
| 258 | 258 | </form> |
| 259 | 259 | </div>"; |
| 260 | - } |
|
| 261 | - |
|
| 262 | - elseif (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === 'eduGAIN') { |
|
| 260 | + } elseif (\config\ConfAssistant::CONSORTIUM['selfservice_registration'] === 'eduGAIN') { |
|
| 263 | 261 | if ($user->edugain !== false) { |
| 264 | 262 | $resyncedInst = $instMgmt->currentInstitutions['resynced']; |
| 265 | 263 | $newInst = $instMgmt->currentInstitutions['new']; |
@@ -328,8 +326,7 @@ discard block |
||
| 328 | 326 | echo "</table>"; |
| 329 | 327 | } |
| 330 | 328 | } |
| 331 | - } |
|
| 332 | - else { // self-service registration is allowed! Yay :-) |
|
| 329 | + } else { // self-service registration is allowed! Yay :-) |
|
| 333 | 330 | echo "<hr> |
| 334 | 331 | <div style='white-space: nowrap;'> |
| 335 | 332 | <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'> |
@@ -52,36 +52,36 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | switch ($_GET['token']) { |
| 55 | - case "EDUGAIN-SELF-REGISTER": |
|
| 56 | - $token = "EDUGAIN-SELF-REGISTER"; |
|
| 57 | - $extIdUnfiltered = filter_input(INPUT_GET,'extid'); |
|
| 58 | - $extIdArray = explode('-', htmlspecialchars(strip_tags($extIdUnfiltered)), 2); |
|
| 59 | - $ROid = $extIdArray[0]; |
|
| 60 | - $extId = $extIdArray[1]; |
|
| 61 | - $fed = new \core\Federation(strtoupper(substr($ROid,0,2))); |
|
| 62 | - $newInstFlag = $fed->getAttributes('fed:autoregister-new-inst'); |
|
| 63 | - if ($newInstFlag === []) { |
|
| 64 | - $elements->errorPage(_("Error creating new IdP!"),_("You tried to register in self-service, but this federation does not allow self-service!")); |
|
| 65 | - } |
|
| 66 | - // we must be sure that this person admins the ext institution and that it falls into the current federation |
|
| 67 | - if ($validator->existingExtInstitution($extId, $userEmail, $ROid) === 1) { |
|
| 55 | + case "EDUGAIN-SELF-REGISTER": |
|
| 56 | + $token = "EDUGAIN-SELF-REGISTER"; |
|
| 57 | + $extIdUnfiltered = filter_input(INPUT_GET,'extid'); |
|
| 58 | + $extIdArray = explode('-', htmlspecialchars(strip_tags($extIdUnfiltered)), 2); |
|
| 59 | + $ROid = $extIdArray[0]; |
|
| 60 | + $extId = $extIdArray[1]; |
|
| 61 | + $fed = new \core\Federation(strtoupper(substr($ROid,0,2))); |
|
| 62 | + $newInstFlag = $fed->getAttributes('fed:autoregister-new-inst'); |
|
| 63 | + if ($newInstFlag === []) { |
|
| 64 | + $elements->errorPage(_("Error creating new IdP!"),_("You tried to register in self-service, but this federation does not allow self-service!")); |
|
| 65 | + } |
|
| 66 | + // we must be sure that this person admins the ext institution and that it falls into the current federation |
|
| 67 | + if ($validator->existingExtInstitution($extId, $userEmail, $ROid) === 1) { |
|
| 68 | + $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
|
| 69 | + } |
|
| 70 | + // and check that this institution does not match anuthing in CAT. |
|
| 71 | + $usermgmt = new \core\UserManagement(); |
|
| 72 | + if ($usermgmt->checkForCatMatch($extId, $ROid) === 1) { |
|
| 73 | + $elements->errorPage(_("Error creating new IdP!"),_("You tried to register a new institution while it already has a match in CAT or your email is not not listed as admin for this institution in the eduroam DB!")); |
|
| 74 | + } |
|
| 75 | + break; |
|
| 76 | + case "SELF-REGISTER": |
|
| 77 | + $token = "SELF-REGISTER"; |
|
| 68 | 78 | $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
| 69 | - } |
|
| 70 | - // and check that this institution does not match anuthing in CAT. |
|
| 71 | - $usermgmt = new \core\UserManagement(); |
|
| 72 | - if ($usermgmt->checkForCatMatch($extId, $ROid) === 1) { |
|
| 73 | - $elements->errorPage(_("Error creating new IdP!"),_("You tried to register a new institution while it already has a match in CAT or your email is not not listed as admin for this institution in the eduroam DB!")); |
|
| 74 | - } |
|
| 75 | - break; |
|
| 76 | - case "SELF-REGISTER": |
|
| 77 | - $token = "SELF-REGISTER"; |
|
| 78 | - $checkval = \core\UserManagement::TOKENSTATUS_OK_NEW; |
|
| 79 | - $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration']; |
|
| 80 | - break; |
|
| 81 | - default: |
|
| 82 | - $tokenUnfiltered = $validator->token(filter_input(INPUT_GET,'token')); |
|
| 83 | - $token = htmlspecialchars(strip_tags($tokenUnfiltered)); |
|
| 84 | - $checkval = $usermgmt->checkTokenValidity($token); |
|
| 79 | + $federation = \config\ConfAssistant::CONSORTIUM['selfservice_registration']; |
|
| 80 | + break; |
|
| 81 | + default: |
|
| 82 | + $tokenUnfiltered = $validator->token(filter_input(INPUT_GET,'token')); |
|
| 83 | + $token = htmlspecialchars(strip_tags($tokenUnfiltered)); |
|
| 84 | + $checkval = $usermgmt->checkTokenValidity($token); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if ($checkval < 0) { |
@@ -883,7 +883,9 @@ |
||
| 883 | 883 | unlink("$zipdir/$key/detail.zip"); |
| 884 | 884 | $files = scandir("$zipdir/$key/"); |
| 885 | 885 | foreach($files as $file) { |
| 886 | - if ($file == '.' || $file == '..') continue; |
|
| 886 | + if ($file == '.' || $file == '..') { |
|
| 887 | + continue; |
|
| 888 | + } |
|
| 887 | 889 | $data = file_get_contents("$zipdir/$key/$file"); |
| 888 | 890 | $zipt->addFromString("radius-$key/$file", $data); |
| 889 | 891 | $cnt += 1; |
@@ -98,103 +98,103 @@ |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | switch ($operationMode) { |
| 101 | - case OPERATION_MODE_EDIT: |
|
| 102 | - $idp = $validator->existingIdP($_GET['inst_id']); |
|
| 103 | - // editing IdPs is done from within the popup. When we're done, send the |
|
| 104 | - // user back to the popup (append the result of the operation later) |
|
| 105 | - $redirectDestination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
| 106 | - if (count($validAddresses) == 0) { |
|
| 107 | - header("Location: $redirectDestination" . "invitation=INVALIDSYNTAX"); |
|
| 108 | - exit(1); |
|
| 109 | - } |
|
| 110 | - // is the user primary admin of this IdP? |
|
| 111 | - $is_owner = $idp->isPrimaryOwner($_SESSION['user']); |
|
| 112 | - // check if he is (also) federation admin for the federation this IdP is in. His invitations have more blessing then. |
|
| 113 | - $fedadmin = $userObject->isFederationAdmin($idp->federation); |
|
| 114 | - // check if he is either one, if not, complain |
|
| 115 | - if (!$is_owner && !$fedadmin) { |
|
| 116 | - echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant) . "</p>"; |
|
| 117 | - exit(1); |
|
| 118 | - } |
|
| 101 | + case OPERATION_MODE_EDIT: |
|
| 102 | + $idp = $validator->existingIdP($_GET['inst_id']); |
|
| 103 | + // editing IdPs is done from within the popup. When we're done, send the |
|
| 104 | + // user back to the popup (append the result of the operation later) |
|
| 105 | + $redirectDestination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
| 106 | + if (count($validAddresses) == 0) { |
|
| 107 | + header("Location: $redirectDestination" . "invitation=INVALIDSYNTAX"); |
|
| 108 | + exit(1); |
|
| 109 | + } |
|
| 110 | + // is the user primary admin of this IdP? |
|
| 111 | + $is_owner = $idp->isPrimaryOwner($_SESSION['user']); |
|
| 112 | + // check if he is (also) federation admin for the federation this IdP is in. His invitations have more blessing then. |
|
| 113 | + $fedadmin = $userObject->isFederationAdmin($idp->federation); |
|
| 114 | + // check if he is either one, if not, complain |
|
| 115 | + if (!$is_owner && !$fedadmin) { |
|
| 116 | + echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant) . "</p>"; |
|
| 117 | + exit(1); |
|
| 118 | + } |
|
| 119 | 119 | |
| 120 | - $prettyprintname = $idp->name; |
|
| 121 | - $newtokens = $mgmt->createTokens($fedadmin, $validAddresses, $idp); |
|
| 122 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $validAddresses)); |
|
| 123 | - $introtext = "CO-ADMIN"; |
|
| 124 | - $participant_type = $idp->type; |
|
| 125 | - break; |
|
| 126 | - case OPERATION_MODE_NEWUNLINKED: |
|
| 127 | - $redirectDestination = "../overview_federation.php?"; |
|
| 128 | - if (count($validAddresses) == 0) { |
|
| 129 | - header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
| 130 | - exit(1); |
|
| 131 | - } |
|
| 132 | - // run an input check and conversion of the raw inputs... just in case |
|
| 133 | - $newinstname = $validator->string($_POST['name']); |
|
| 134 | - $newcountry = $validator->string($_POST['country']); |
|
| 135 | - $participant_type = $validator->partType($_POST['participant_type']); |
|
| 136 | - $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
|
| 137 | - if ($new_idp_authorized_fedadmin !== TRUE) { |
|
| 138 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
| 139 | - } |
|
| 140 | - $federation = $validator->existingFederation($newcountry); |
|
| 141 | - $prettyprintname = $newinstname; |
|
| 142 | - $introtext = "NEW-FED"; |
|
| 143 | - // send the user back to his federation overview page, append the result of the operation later |
|
| 144 | - // do the token creation magic |
|
| 145 | - $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $newinstname, 0, $newcountry, $participant_type); |
|
| 146 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type " . implode(",", $validAddresses)); |
|
| 147 | - break; |
|
| 148 | - case OPERATION_MODE_NEWFROMDB: |
|
| 149 | - $redirectDestination = "../overview_federation.php?"; |
|
| 150 | - if (count($validAddresses) == 0) { |
|
| 151 | - header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
| 152 | - exit(1); |
|
| 153 | - } |
|
| 154 | - // a real external DB entry was submitted and all the required parameters are there |
|
| 155 | - $externals = $validator->string($_POST['externals']); |
|
| 156 | - [$fedId, $newexternalid] = explode('-', $externals, 2); |
|
| 157 | - $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid, strtoupper($fedId).'01'); |
|
| 158 | - $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
|
| 159 | - if ($new_idp_authorized_fedadmin !== TRUE) { |
|
| 160 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
| 161 | - } |
|
| 162 | - $federation = $validator->existingFederation($extinfo['country']); |
|
| 163 | - $newcountry = $extinfo['country']; |
|
| 164 | - // see if the inst name is defined in the currently set language; if not, pick its English name; if N/A, pick the last in the list |
|
| 165 | - $prettyprintname = ""; |
|
| 166 | - foreach ($extinfo['names'] as $lang => $name) { |
|
| 167 | - if ($lang == $languageInstance->getLang()) { |
|
| 168 | - $prettyprintname = $name; |
|
| 120 | + $prettyprintname = $idp->name; |
|
| 121 | + $newtokens = $mgmt->createTokens($fedadmin, $validAddresses, $idp); |
|
| 122 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $validAddresses)); |
|
| 123 | + $introtext = "CO-ADMIN"; |
|
| 124 | + $participant_type = $idp->type; |
|
| 125 | + break; |
|
| 126 | + case OPERATION_MODE_NEWUNLINKED: |
|
| 127 | + $redirectDestination = "../overview_federation.php?"; |
|
| 128 | + if (count($validAddresses) == 0) { |
|
| 129 | + header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
| 130 | + exit(1); |
|
| 169 | 131 | } |
| 170 | - } |
|
| 171 | - if ($prettyprintname == "" && isset($extinfo['names']['en'])) { |
|
| 172 | - $prettyprintname = $extinfo['names']['en']; |
|
| 173 | - } |
|
| 174 | - if ($prettyprintname == "") { |
|
| 175 | - foreach ($extinfo['names'] as $name) { |
|
| 176 | - $prettyprintname = $name; |
|
| 132 | + // run an input check and conversion of the raw inputs... just in case |
|
| 133 | + $newinstname = $validator->string($_POST['name']); |
|
| 134 | + $newcountry = $validator->string($_POST['country']); |
|
| 135 | + $participant_type = $validator->partType($_POST['participant_type']); |
|
| 136 | + $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
|
| 137 | + if ($new_idp_authorized_fedadmin !== TRUE) { |
|
| 138 | + throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
| 177 | 139 | } |
| 178 | - } |
|
| 179 | - if(\config\Master::FUNCTIONALITY_FLAGS['SINGLE_SERVICE'] === 'MSP') { |
|
| 180 | - $participant_type = \core\IdP::TYPE_SP; |
|
| 181 | - } else { |
|
| 182 | - $participant_type = $extinfo['type']; |
|
| 183 | - } |
|
| 184 | - // fill the rest of the text |
|
| 185 | - $introtext = "EXISTING-FED"; |
|
| 186 | - // do the token creation magic |
|
| 187 | - $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $prettyprintname, $newexternalid, $fedId); |
|
| 188 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $validAddresses)); |
|
| 189 | - break; |
|
| 190 | - default: // includes OPERATION_MODE_INVALID |
|
| 191 | - // second param is TRUE, so the variable *will* contain a string |
|
| 192 | - // i.e. ignore Scrutinizer type warning later |
|
| 193 | - $wrongcontent = print_r($_POST, TRUE); |
|
| 194 | - echo "<pre>Wrong parameters in POST: |
|
| 140 | + $federation = $validator->existingFederation($newcountry); |
|
| 141 | + $prettyprintname = $newinstname; |
|
| 142 | + $introtext = "NEW-FED"; |
|
| 143 | + // send the user back to his federation overview page, append the result of the operation later |
|
| 144 | + // do the token creation magic |
|
| 145 | + $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $newinstname, 0, $newcountry, $participant_type); |
|
| 146 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type " . implode(",", $validAddresses)); |
|
| 147 | + break; |
|
| 148 | + case OPERATION_MODE_NEWFROMDB: |
|
| 149 | + $redirectDestination = "../overview_federation.php?"; |
|
| 150 | + if (count($validAddresses) == 0) { |
|
| 151 | + header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
| 152 | + exit(1); |
|
| 153 | + } |
|
| 154 | + // a real external DB entry was submitted and all the required parameters are there |
|
| 155 | + $externals = $validator->string($_POST['externals']); |
|
| 156 | + [$fedId, $newexternalid] = explode('-', $externals, 2); |
|
| 157 | + $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid, strtoupper($fedId).'01'); |
|
| 158 | + $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
|
| 159 | + if ($new_idp_authorized_fedadmin !== TRUE) { |
|
| 160 | + throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
| 161 | + } |
|
| 162 | + $federation = $validator->existingFederation($extinfo['country']); |
|
| 163 | + $newcountry = $extinfo['country']; |
|
| 164 | + // see if the inst name is defined in the currently set language; if not, pick its English name; if N/A, pick the last in the list |
|
| 165 | + $prettyprintname = ""; |
|
| 166 | + foreach ($extinfo['names'] as $lang => $name) { |
|
| 167 | + if ($lang == $languageInstance->getLang()) { |
|
| 168 | + $prettyprintname = $name; |
|
| 169 | + } |
|
| 170 | + } |
|
| 171 | + if ($prettyprintname == "" && isset($extinfo['names']['en'])) { |
|
| 172 | + $prettyprintname = $extinfo['names']['en']; |
|
| 173 | + } |
|
| 174 | + if ($prettyprintname == "") { |
|
| 175 | + foreach ($extinfo['names'] as $name) { |
|
| 176 | + $prettyprintname = $name; |
|
| 177 | + } |
|
| 178 | + } |
|
| 179 | + if(\config\Master::FUNCTIONALITY_FLAGS['SINGLE_SERVICE'] === 'MSP') { |
|
| 180 | + $participant_type = \core\IdP::TYPE_SP; |
|
| 181 | + } else { |
|
| 182 | + $participant_type = $extinfo['type']; |
|
| 183 | + } |
|
| 184 | + // fill the rest of the text |
|
| 185 | + $introtext = "EXISTING-FED"; |
|
| 186 | + // do the token creation magic |
|
| 187 | + $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $prettyprintname, $newexternalid, $fedId); |
|
| 188 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $validAddresses)); |
|
| 189 | + break; |
|
| 190 | + default: // includes OPERATION_MODE_INVALID |
|
| 191 | + // second param is TRUE, so the variable *will* contain a string |
|
| 192 | + // i.e. ignore Scrutinizer type warning later |
|
| 193 | + $wrongcontent = print_r($_POST, TRUE); |
|
| 194 | + echo "<pre>Wrong parameters in POST: |
|
| 195 | 195 | " . htmlspecialchars(/** @scrutinizer ignore-type */ $wrongcontent) . " |
| 196 | 196 | </pre>"; |
| 197 | - exit(1); |
|
| 197 | + exit(1); |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | // send, and invalidate the token immediately if the mail could not be sent! |