@@ -121,7 +121,7 @@ |
||
| 121 | 121 | if ($trailerPosition !== FALSE) { |
| 122 | 122 | $base = substr($scriptself, 0, $trailerPosition); |
| 123 | 123 | if ($base !== FALSE) { |
| 124 | - $url = "//$servername" . $base . "/logout_check.php"; |
|
| 124 | + $url = "//$servername".$base."/logout_check.php"; |
|
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | |
@@ -136,19 +136,19 @@ discard block |
||
| 136 | 136 | protected function htmlPreEdit($wizardMode, $additional) { |
| 137 | 137 | \core\common\Entity::intoThePotatoes(); |
| 138 | 138 | $retval = "<fieldset class='option_container'> |
| 139 | - <legend><strong>" . _("Location") . "</strong></legend>"; |
|
| 139 | + <legend><strong>" . _("Location")."</strong></legend>"; |
|
| 140 | 140 | |
| 141 | 141 | if ($wizardMode) { |
| 142 | - $retval .= "<p>" . |
|
| 143 | - _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you.") . |
|
| 142 | + $retval .= "<p>". |
|
| 143 | + _("The user download interface (see <a href='../'>here</a>), uses geolocation to suggest possibly matching IdPs to the user. The more precise you define the location here, the easier your users will find you."). |
|
| 144 | 144 | "</p> |
| 145 | 145 | <ul>" . |
| 146 | 146 | _("<li>Drag the marker in the map to your place, or</li> |
| 147 | 147 | <li>enter your street address in the field below for lookup, or</li> |
| 148 | -<li>use the 'Locate Me!' button</li>") . |
|
| 148 | +<li>use the 'Locate Me!' button</li>"). |
|
| 149 | 149 | "</ul> |
| 150 | 150 | <strong>" . |
| 151 | - _("We will use the coordinates as indicated by the marker for geolocation.") . |
|
| 151 | + _("We will use the coordinates as indicated by the marker for geolocation."). |
|
| 152 | 152 | "</strong>"; |
| 153 | 153 | } |
| 154 | 154 | if ($additional) { |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | protected function htmlPostEdit($allowDirectInput) { |
| 168 | 168 | \core\common\Entity::intoThePotatoes(); |
| 169 | - $retval = "<br/>" . _("Latitude:") . " <input style='width:80px' name='geo_lat' id='geo_lat' " .($allowDirectInput ? "": "readonly"). ">" . _("Longitude:") . " <input name='geo_long' id='geo_long' style='width:80px' " .($allowDirectInput ? "": "readonly"). "></fieldset>"; |
|
| 169 | + $retval = "<br/>"._("Latitude:")." <input style='width:80px' name='geo_lat' id='geo_lat' ".($allowDirectInput ? "" : "readonly").">"._("Longitude:")." <input name='geo_long' id='geo_long' style='width:80px' ".($allowDirectInput ? "" : "readonly")."></fieldset>"; |
|
| 170 | 170 | \core\common\Entity::outOfThePotatoes(); |
| 171 | 171 | return $retval; |
| 172 | 172 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | "TXT" => _("Did the device previously work when roaming, i.e. at other hotspots away from your home institution?"), |
| 91 | 91 | "FACTOR_YES" => 0.6, // that's good, and somewhat encouraging |
| 92 | 92 | "FACTOR_NO" => 3, // that is almost a smoking gun |
| 93 | - "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at your home organisation, but can not be used when roaming. %s"),$confAssistantText)], |
|
| 93 | + "VERDICTLECTURE" => sprintf(_("If roaming consistently does not work, then very likely your device configuration is wrong. Typical errors causing this symptom include: using a routing ('outer') username without the @realm.tld suffix - those potentially work at your home organisation, but can not be used when roaming. %s"), $confAssistantText)], |
|
| 94 | 94 | 3 => ["AREA" => AbstractTest::INFRA_DEVICE, |
| 95 | 95 | "TXT" => _("Did you recently change the configuration on your device?"), |
| 96 | 96 | "FACTOR_YES" => 3, // that is almost a smoking gun |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | "TXT" => _("If you use more than one device: do your other devices still work?"), |
| 106 | 106 | "FACTOR_YES" => 0.33, // seems that all is okay with the account as such |
| 107 | 107 | "FACTOR_NO" => 3, // now that is suspicious indeed |
| 108 | - "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"),], |
|
| 108 | + "VERDICTLECTURE" => _("If all devices stopped working simultaneously, there may be a problem with your account as such. Maybe your account expired, or you were forced to change the password? These questions are best answered by your Identity Provider [MGW: display contact info]"), ], |
|
| 109 | 109 | 6 => ["AREA" => AbstractTest::INFRA_SP_80211, |
| 110 | 110 | "TXT" => _("Is the place you are currently at heavily crowded, or is a network-intensive workload going on?"), |
| 111 | 111 | "FACTOR_YES" => 3, |
@@ -140,11 +140,11 @@ discard block |
||
| 140 | 140 | $questionDetails = $this->qaArray[$questionNumber]; |
| 141 | 141 | if ($answer === TRUE) { |
| 142 | 142 | $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_YES"]; |
| 143 | - $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n"); |
|
| 143 | + $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_YES"]."\n"); |
|
| 144 | 144 | $factor = $questionDetails["FACTOR_YES"]; |
| 145 | 145 | } elseif ($answer === FALSE) { |
| 146 | 146 | $this->possibleFailureReasons[$questionDetails['AREA']] = $this->possibleFailureReasons[$questionDetails['AREA']] * $questionDetails["FACTOR_NO"]; |
| 147 | - $this->loggerInstance->debug(3,"Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n"); |
|
| 147 | + $this->loggerInstance->debug(3, "Adjusting ".$questionDetails['AREA']." by ".$questionDetails["FACTOR_NO"]."\n"); |
|
| 148 | 148 | $factor = $questionDetails["FACTOR_NO"]; |
| 149 | 149 | } else { |
| 150 | 150 | $factor = 1; |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | $this->additionalFindings["QUESTIONSASKED"] = $this->previousQuestions; |
| 159 | 159 | $_SESSION["SUSPECTS"] = $this->possibleFailureReasons; |
| 160 | 160 | $_SESSION["EVIDENCE"] = $this->additionalFindings; |
| 161 | - $this->loggerInstance->debug(3,$_SESSION['SUSPECTS']); |
|
| 162 | - $this->loggerInstance->debug(3,$_SESSION['EVIDENCE']); |
|
| 161 | + $this->loggerInstance->debug(3, $_SESSION['SUSPECTS']); |
|
| 162 | + $this->loggerInstance->debug(3, $_SESSION['EVIDENCE']); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | // if both are identical, take any of the questions in the pool of both |
| 179 | 179 | foreach ($this->qaArray as $questionNumber => $questionDetails) { |
| 180 | 180 | // if we find a question we didn't ask before AND it is related to our currently high-scoring problem area, ask it |
| 181 | - if (!array_key_exists($questionNumber, $this->previousQuestions) && ( $questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory) ) { |
|
| 181 | + if (!array_key_exists($questionNumber, $this->previousQuestions) && ($questionDetails["AREA"] == $highestCategory || $questionDetails["AREA"] == $nextCategory)) { |
|
| 182 | 182 | return json_encode(["NEXTEXISTS" => TRUE, "NUMBER" => $questionNumber, "TEXT" => $questionDetails["TXT"]]); |
| 183 | 183 | } |
| 184 | 184 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * @return string JSON encoded array with all the info we have |
| 193 | 193 | */ |
| 194 | 194 | public function getCurrentGuessState() { |
| 195 | - return json_encode([ "SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings ]); |
|
| 195 | + return json_encode(["SUSPECTS" => $this->possibleFailureReasons, "EVIDENCE" => $this->additionalFindings]); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | /** |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | if ($this->idPFederation === NULL && preg_match("/\.(..)$/", $realm, $matches)) { |
| 111 | 111 | $this->idPFederation = strtoupper($matches[1]); |
| 112 | 112 | } |
| 113 | - $this->loggerInstance->debug(4, "XYZ: IdP-side NRO is " . $this->idPFederation . "\n"); |
|
| 113 | + $this->loggerInstance->debug(4, "XYZ: IdP-side NRO is ".$this->idPFederation."\n"); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /* The eduroam OT monitoring has the following return codes: |
@@ -434,12 +434,12 @@ discard block |
||
| 434 | 434 | break; |
| 435 | 435 | case \core\AbstractProfile::READINESS_LEVEL_NOTREADY: |
| 436 | 436 | $this->additionalFindings[AbstractTest::INFRA_IDP_RADIUS][] = ["Profile" => "UNCONCLUSIVE"]; |
| 437 | - $this->testsuite = new RADIUSTests($this->realm, "anonymous@" . $this->realm); |
|
| 437 | + $this->testsuite = new RADIUSTests($this->realm, "anonymous@".$this->realm); |
|
| 438 | 438 | break; |
| 439 | 439 | default: |
| 440 | 440 | } |
| 441 | 441 | } else { |
| 442 | - $this->testsuite = new RADIUSTests($this->realm, "anonymous@" . $this->realm); |
|
| 442 | + $this->testsuite = new RADIUSTests($this->realm, "anonymous@".$this->realm); |
|
| 443 | 443 | } |
| 444 | 444 | } |
| 445 | 445 | |
@@ -167,7 +167,7 @@ |
||
| 167 | 167 | $this->NAPTR_executed = RADIUSTests::RETVAL_NOTCONFIGURED; |
| 168 | 168 | return RADIUSTests::RETVAL_NOTCONFIGURED; |
| 169 | 169 | } |
| 170 | - $NAPTRs = dns_get_record($this->realm . ".", DNS_NAPTR); |
|
| 170 | + $NAPTRs = dns_get_record($this->realm.".", DNS_NAPTR); |
|
| 171 | 171 | if ($NAPTRs === FALSE || count($NAPTRs) == 0) { |
| 172 | 172 | $this->NAPTR_executed = RFC7585Tests::RETVAL_NONAPTR; |
| 173 | 173 | return RFC7585Tests::RETVAL_NONAPTR; |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * <base_url>/copyright.php after deploying the software |
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | -require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php"; |
|
| 23 | +require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php"; |
|
| 24 | 24 | |
| 25 | 25 | $auth = new \web\lib\admin\Authentication(); |
| 26 | 26 | $auth->authenticate(); |
@@ -76,9 +76,9 @@ discard block |
||
| 76 | 76 | $idp = $validator->existingIdP($_GET['inst_id']); |
| 77 | 77 | // editing IdPs is done from within the popup. When we're done, send the |
| 78 | 78 | // user back to the popup (append the result of the operation later) |
| 79 | - $redirectDestination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
| 79 | + $redirectDestination = "manageAdmins.inc.php?inst_id=".$idp->identifier."&"; |
|
| 80 | 80 | if (count($validAddresses) == 0) { |
| 81 | - header("Location: $redirectDestination" . "invitation=INVALIDSYNTAX"); |
|
| 81 | + header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
| 82 | 82 | exit(1); |
| 83 | 83 | } |
| 84 | 84 | // is the user primary admin of this IdP? |
@@ -87,13 +87,13 @@ discard block |
||
| 87 | 87 | $fedadmin = $userObject->isFederationAdmin($idp->federation); |
| 88 | 88 | // check if he is either one, if not, complain |
| 89 | 89 | if (!$is_owner && !$fedadmin) { |
| 90 | - 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->nomenclatureInst) . "</p>"; |
|
| 90 | + 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->nomenclatureInst)."</p>"; |
|
| 91 | 91 | exit(1); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | $prettyprintname = $idp->name; |
| 95 | 95 | $newtokens = $mgmt->createTokens($fedadmin, $validAddresses, $idp); |
| 96 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $validAddresses)); |
|
| 96 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$idp->identifier." - Token created for ".implode(",", $validAddresses)); |
|
| 97 | 97 | $introtext = "CO-ADMIN"; |
| 98 | 98 | $participant_type = $idp->type; |
| 99 | 99 | break; |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $participant_type = $validator->partType($_POST['participant_type']); |
| 110 | 110 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
| 111 | 111 | if ($new_idp_authorized_fedadmin !== TRUE) { |
| 112 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
| 112 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureInst.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
| 113 | 113 | } |
| 114 | 114 | $federation = $validator->existingFederation($newcountry); |
| 115 | 115 | $prettyprintname = $newinstname; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | // send the user back to his federation overview page, append the result of the operation later |
| 118 | 118 | // do the token creation magic |
| 119 | 119 | $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $newinstname, 0, $newcountry, $participant_type); |
| 120 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type " . implode(",", $validAddresses)); |
|
| 120 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type ".implode(",", $validAddresses)); |
|
| 121 | 121 | break; |
| 122 | 122 | case OPERATION_MODE_NEWFROMDB: |
| 123 | 123 | $redirectDestination = "../overview_federation.php?"; |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid); |
| 131 | 131 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
| 132 | 132 | if ($new_idp_authorized_fedadmin !== TRUE) { |
| 133 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureInst . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
| 133 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureInst.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
| 134 | 134 | } |
| 135 | 135 | $federation = $validator->existingFederation($extinfo['country']); |
| 136 | 136 | $newcountry = $extinfo['country']; |
@@ -154,12 +154,12 @@ discard block |
||
| 154 | 154 | $introtext = "EXISTING-FED"; |
| 155 | 155 | // do the token creation magic |
| 156 | 156 | $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $prettyprintname, $newexternalid); |
| 157 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $validAddresses)); |
|
| 157 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for ".implode(",", $validAddresses)); |
|
| 158 | 158 | break; |
| 159 | 159 | default: // includes OPERATION_MODE_INVALID |
| 160 | 160 | $wrongcontent = print_r($_POST, TRUE); |
| 161 | 161 | echo "<pre>Wrong parameters in POST: |
| 162 | -" . htmlspecialchars($wrongcontent) . " |
|
| 162 | +" . htmlspecialchars($wrongcontent)." |
|
| 163 | 163 | </pre>"; |
| 164 | 164 | exit(1); |
| 165 | 165 | } |
@@ -184,14 +184,14 @@ discard block |
||
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | if (count($status) == 0) { |
| 187 | - header("Location: $redirectDestination" . "invitation=FAILURE"); |
|
| 187 | + header("Location: $redirectDestination"."invitation=FAILURE"); |
|
| 188 | 188 | exit; |
| 189 | 189 | } |
| 190 | 190 | $finalDestParams = "invitation=SUCCESS"; |
| 191 | 191 | if (count($status) < count($totalSegments)) { // only a subset of mails was sent, update status |
| 192 | 192 | $finalDestParams = "invitation=PARTIAL"; |
| 193 | 193 | } |
| 194 | -$finalDestParams .= "&successcount=" . count($status); |
|
| 194 | +$finalDestParams .= "&successcount=".count($status); |
|
| 195 | 195 | if ($allEncrypted === TRUE) { |
| 196 | 196 | $finalDestParams .= "&transportsecurity=ENCRYPTED"; |
| 197 | 197 | } elseif ($allClear === TRUE) { |
@@ -200,4 +200,4 @@ discard block |
||
| 200 | 200 | $finalDestParams .= "&transportsecurity=PARTIAL"; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | -header("Location: $redirectDestination" . $finalDestParams); |
|
| 203 | +header("Location: $redirectDestination".$finalDestParams); |
|
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * <base_url>/copyright.php after deploying the software |
| 21 | 21 | */ |
| 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 | // no SAML auth on this page. The API key authenticates the entity |
| 26 | 26 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $inputRaw = file_get_contents('php://input'); |
| 39 | 39 | $inputDecoded = json_decode($inputRaw, TRUE); |
| 40 | 40 | if (!is_array($inputDecoded)) { |
| 41 | - $adminApi->returnError(web\lib\admin\API::ERROR_MALFORMED_REQUEST, "Unable to decode JSON POST data." . json_last_error_msg() . $inputRaw); |
|
| 41 | + $adminApi->returnError(web\lib\admin\API::ERROR_MALFORMED_REQUEST, "Unable to decode JSON POST data.".json_last_error_msg().$inputRaw); |
|
| 42 | 42 | exit(1); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | throw new Exception("A required parameter is missing, and this wasn't caught earlier?!"); |
| 133 | 133 | } |
| 134 | 134 | $newtokens = $mgmt->createTokens(true, [$admin], $idp); |
| 135 | - $URL = "https://" . $_SERVER['SERVER_NAME'] . dirname($_SERVER['SCRIPT_NAME']) . "/action_enrollment.php?token=" . array_keys($newtokens)[0]; |
|
| 135 | + $URL = "https://".$_SERVER['SERVER_NAME'].dirname($_SERVER['SCRIPT_NAME'])."/action_enrollment.php?token=".array_keys($newtokens)[0]; |
|
| 136 | 136 | $success = ["TOKEN URL" => $URL, "TOKEN" => array_keys($newtokens)[0]]; |
| 137 | 137 | // done with the essentials - display in response. But if we also have an email address, send it there |
| 138 | 138 | $email = $adminApi->firstParameterInstance($scrubbedParameters, web\lib\admin\API::AUXATTRIB_TARGETMAIL); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | if ($found) { |
| 170 | 170 | $adminApi->returnSuccess([]); |
| 171 | 171 | } |
| 172 | - $adminApi->returnError(web\lib\admin\API::ERROR_INVALID_PARAMETER, "The admin with ID $toBeDeleted is not associated to IdP " . $idp->identifier); |
|
| 172 | + $adminApi->returnError(web\lib\admin\API::ERROR_INVALID_PARAMETER, "The admin with ID $toBeDeleted is not associated to IdP ".$idp->identifier); |
|
| 173 | 173 | break; |
| 174 | 174 | case web\lib\admin\API::ACTION_STATISTICS_FED: |
| 175 | 175 | $adminApi->returnSuccess($fed->downloadStats("array")); |
@@ -216,10 +216,10 @@ discard block |
||
| 216 | 216 | $outer = ""; |
| 217 | 217 | $profile->setAnonymousIDSupport(FALSE); |
| 218 | 218 | } else { |
| 219 | - $outer = $outer . "@"; |
|
| 219 | + $outer = $outer."@"; |
|
| 220 | 220 | $profile->setAnonymousIDSupport(TRUE); |
| 221 | 221 | } |
| 222 | - $profile->setRealm($outer . $realm); |
|
| 222 | + $profile->setRealm($outer.$realm); |
|
| 223 | 223 | } |
| 224 | 224 | /* const AUXATTRIB_PROFILE_TESTUSER = 'ATTRIB-PROFILE-TESTUSER'; */ |
| 225 | 225 | $testuser = $adminApi->firstParameterInstance($scrubbedParameters, web\lib\admin\API::AUXATTRIB_PROFILE_TESTUSER); |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | // extract relevant subset of information from cert objects |
| 448 | 448 | $certDetails = []; |
| 449 | 449 | foreach ($certs as $cert) { |
| 450 | - $certDetails[$cert->ca_type . ":" . $cert->serial] = ["ISSUED" => $cert->issued, "EXPIRY" => $cert->expiry, "STATUS" => $cert->status, "DEVICE" => $cert->device, "CN" => $cert->username, "ANNOTATION" => $cert->annotation]; |
|
| 450 | + $certDetails[$cert->ca_type.":".$cert->serial] = ["ISSUED" => $cert->issued, "EXPIRY" => $cert->expiry, "STATUS" => $cert->status, "DEVICE" => $cert->device, "CN" => $cert->username, "ANNOTATION" => $cert->annotation]; |
|
| 451 | 451 | } |
| 452 | 452 | $adminApi->returnSuccess($certDetails); |
| 453 | 453 | break; |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | const ACTIONS = [ |
| 239 | 239 | // Inst-level actions. |
| 240 | 240 | API::ACTION_NEWINST_BY_REF => [ |
| 241 | - "REQ" => [API::AUXATTRIB_EXTERNALID,], |
|
| 241 | + "REQ" => [API::AUXATTRIB_EXTERNALID, ], |
|
| 242 | 242 | "OPT" => [ |
| 243 | 243 | 'general:geo_coordinates', |
| 244 | 244 | 'general:logo_file', |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | ], |
| 256 | 256 | ], |
| 257 | 257 | API::ACTION_NEWINST => [ |
| 258 | - "REQ" => [API::AUXATTRIB_INSTTYPE,], // "IdP", "SP" or "IdPSP" |
|
| 258 | + "REQ" => [API::AUXATTRIB_INSTTYPE, ], // "IdP", "SP" or "IdPSP" |
|
| 259 | 259 | "OPT" => [ |
| 260 | 260 | 'general:instname', |
| 261 | 261 | 'general:geo_coordinates', |
@@ -543,8 +543,8 @@ discard block |
||
| 543 | 543 | |
| 544 | 544 | case \core\Options::TYPECODE_COORDINATES: |
| 545 | 545 | $extension = \core\Options::TYPECODE_TEXT; |
| 546 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
| 547 | - $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE']; |
|
| 546 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
| 547 | + $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE']; |
|
| 548 | 548 | break; |
| 549 | 549 | case \core\Options::TYPECODE_TEXT: |
| 550 | 550 | // Fall-through: they all get the same treatment. |
@@ -554,18 +554,18 @@ discard block |
||
| 554 | 554 | // Fall-through: they all get the same treatment. |
| 555 | 555 | case \core\Options::TYPECODE_INTEGER: |
| 556 | 556 | $extension = $optionInfo['type']; |
| 557 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
| 558 | - $coercedInline["value"][$basename . "-" . $extension] = $oneAttrib['VALUE']; |
|
| 557 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
| 558 | + $coercedInline["value"][$basename."-".$extension] = $oneAttrib['VALUE']; |
|
| 559 | 559 | if ($optionInfo['flag'] == "ML") { |
| 560 | - $coercedInline["value"][$basename . "-lang"] = $oneAttrib['LANG']; |
|
| 560 | + $coercedInline["value"][$basename."-lang"] = $oneAttrib['LANG']; |
|
| 561 | 561 | } |
| 562 | 562 | break; |
| 563 | 563 | case \core\Options::TYPECODE_FILE: |
| 564 | 564 | // Binary data is expected in base64 encoding. This is true also for PEM files! |
| 565 | 565 | $extension = $optionInfo['type']; |
| 566 | - $coercedInline["option"][$basename] = $oneAttrib['NAME'] . "#"; |
|
| 567 | - file_put_contents($dir['dir'] . "/" . $basename . "-" . $extension, base64_decode($oneAttrib['VALUE'])); |
|
| 568 | - $coercedFile["value"]['tmp_name'][$basename . "-" . $extension] = $dir['dir'] . "/" . $basename . "-" . $extension; |
|
| 566 | + $coercedInline["option"][$basename] = $oneAttrib['NAME']."#"; |
|
| 567 | + file_put_contents($dir['dir']."/".$basename."-".$extension, base64_decode($oneAttrib['VALUE'])); |
|
| 568 | + $coercedFile["value"]['tmp_name'][$basename."-".$extension] = $dir['dir']."/".$basename."-".$extension; |
|
| 569 | 569 | break; |
| 570 | 570 | default: |
| 571 | 571 | throw new Exception("We don't seem to know this type code!"); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | * <base_url>/copyright.php after deploying the software |
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | -require_once __DIR__ . "/../core/Psr4Autoloader.php"; |
|
| 22 | +require_once __DIR__."/../core/Psr4Autoloader.php"; |
|
| 23 | 23 | use core\autoloader\Psr4Autoloader; |
| 24 | 24 | |
| 25 | 25 | // instantiate the loader |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | // register the base directories for the namespace prefix |
| 32 | 32 | // include configuration |
| 33 | -$loader->addNamespace('config', __DIR__ ); |
|
| 33 | +$loader->addNamespace('config', __DIR__); |
|
| 34 | 34 | // include CAT/core library |
| 35 | -$loader->addNamespace('core', __DIR__ . "/../core"); |
|
| 35 | +$loader->addNamespace('core', __DIR__."/../core"); |
|
| 36 | 36 | // include CAT/devices library |
| 37 | -$loader->addNamespace('devices', __DIR__ . "/../devices"); |
|
| 37 | +$loader->addNamespace('devices', __DIR__."/../devices"); |
|
| 38 | 38 | // include CAT/web library |
| 39 | -$loader->addNamespace('web', __DIR__ . "/../web"); |
|
| 40 | 39 | \ No newline at end of file |
| 40 | +$loader->addNamespace('web', __DIR__."/../web"); |
|
| 41 | 41 | \ No newline at end of file |