diff --git a/utils/test_openroaming.php b/utils/test_openroaming.php index ec28bc06d..1ec6cad87 100644 --- a/utils/test_openroaming.php +++ b/utils/test_openroaming.php @@ -28,7 +28,7 @@ } -while ( $row = mysqli_fetch_object($allOpenRoamingProfiles)) { +while ( $row = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allOpenRoamingProfiles)) { $profileId = $row->profile_id; print "$profileId\n"; $profile = \core\ProfileFactory::instantiate($profileId); diff --git a/web/admin/edit_profile_result.php b/web/admin/edit_profile_result.php index 5ce92a4fa..570b63734 100644 --- a/web/admin/edit_profile_result.php +++ b/web/admin/edit_profile_result.php @@ -53,7 +53,7 @@ echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); } else { $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ". $my_inst->identifier." - Profile created"); + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP"); } if (!$profile instanceof \core\ProfileRADIUS) { @@ -63,9 +63,9 @@ $realm = FALSE; $anon_support = FALSE; $attributes = $profile->getAttributes(); - $anonLocal = \core\common\Entity::getAttributeValue($attributes, "internal:anon_local_value", 0) ?? "anonymous"; + $anonLocal = \core\common\Entity::getAttributeValue($attributes, "internal:anon_local_value", 0) ?? "anonymous"; $checkuser_support = FALSE; - $checkuser_local = \core\common\Entity::getAttributeValue($attributes, "internal:checkuser_value", 0) ?? "anonymous"; + $checkuser_local = \core\common\Entity::getAttributeValue($attributes, "internal:checkuser_value", 0) ?? "anonymous"; $verify_support = FALSE; $hint_support = FALSE; $redirect = FALSE; @@ -255,21 +255,20 @@ switch ($orTest['level']) { case \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_ERROR: echo $uiElements->boxError($orTest['explanation']); - break; + break; case \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_WARN: - echo $uiElements->boxWarning($orTest['explanation']); - break; + echo $uiElements->boxWarning($orTest['explanation']); + break; case \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_NOTE: - echo $uiElements->boxRemark($orTest['explanation']); + echo $uiElements->boxRemark($orTest['explanation']); break; case \core\diag\AbstractTest::RETVAL_OK: - echo $uiElements->boxOkay($orTest['explanation']); + echo $uiElements->boxOkay($orTest['explanation']); break; default: break; - } + } } - } /* $resultLevel = \core\AbstractProfile::OVERALL_OPENROAMING_LEVEL_GOOD; // assume all is well, degrade if we have concrete findings to suggest otherwise diff --git a/web/admin/overview_federation.php b/web/admin/overview_federation.php index 84ea21bfe..a479e0f5c 100644 --- a/web/admin/overview_federation.php +++ b/web/admin/overview_federation.php @@ -19,7 +19,7 @@ * /copyright.php after deploying the software */ -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; $deco = new \web\lib\admin\PageDecoration(); $uiElements = new web\lib\admin\UIElements(); @@ -72,16 +72,16 @@

- + - - - + + + infoblock($user->getAttributes(), "user", "User"); ?> @@ -93,7 +93,7 @@ - + isSuperadmin() && isset($_GET['fed_id'])) { $cat = new \core\CAT(); // initialises Entity static members $fedIdentifiers = array_keys($cat->knownFederations); - if (!in_array(strtoupper($_GET['fed_id']), $fedIdentifiers)) { + $fed_id = htmlentities($_GET['fed_id'], ENT_QUOTES); + if (!in_array(strtoupper($fed_id), $fedIdentifiers)) { throw new Exception($this->inputValidationError(sprintf("This %s does not exist!", \core\common\Entity::$nomenclature_fed))); - } else { - $fed_id = $_GET['fed_id']; } $feds = [['name'=>' user:fedadmin', 'value' => $fed_id]]; } elseif (!$user->isFederationAdmin()) { - echo "

" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "

"; + echo "

".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."

"; echo $deco->footer(); exit(0); } else { @@ -123,16 +122,16 @@ nomenclatureFed, $thefed->name); echo $tablecaption2; ?>
- +
- + - - - + + + @@ -216,7 +215,7 @@ default: throw new Exception("Error: unknown encryption status of invitation!?!"); } - echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); + echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); break; case "FAILURE": echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); @@ -236,7 +235,7 @@ default: throw new Exception("Error: unknown encryption status of invitation!?!"); } - echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); + echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); break; case "INVALIDSYNTAX": echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); @@ -252,27 +251,27 @@ } else { $link = 'http://'; } - $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME']; + $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; $link = htmlspecialchars($link); if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') { echo "
- +
- +
" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP) . "".sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP)."
- +
"; } if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') { - $helptext = "

" . sprintf(_("Need help? Refer to the %s manual"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "

"; + $helptext = "

".sprintf(_("Need help? Refer to the %s manual"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."

"; } else { $helptext = ""; } ?> - + @@ -282,7 +281,7 @@ $pending_invites = $mgmt->listPendingInvitations(); if (\config\Master::DB['enforce-external-sync']) { - echo ""; + echo ""; } ?> "; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; echo ""; // extract only pending invitations for *this* fed $display_pendings = FALSE; @@ -351,17 +350,17 @@ } echo ""; + . $index."'>" + . "" + . "". $idp_instance->name."" + . " (" + . (in_array($index, $userIdps) ? _("manage") : _("view")) + . ")" + . (empty($listOfSilverbulletRealms) ? "" : ""; @@ -445,18 +444,18 @@ if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) { echo ""; echo " ";
nomenclatureParticipant); ?> " . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])." @@ -299,9 +298,9 @@ $fedId = strtoupper($onefed['value']); $thefed = new \core\Federation($fedId); /// nomenclature for 'federation', federation name, nomenclature for 'inst' - echo "
" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '' . $thefed->name . '') . "
". _("Quick search:")." ". _("Only not linked"). "
".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, ''.$thefed->name.'')."
". _("Quick search:")." ". _("Only not linked"). "
" - . "" - . "". $idp_instance->name . "" - . " (" - . (in_array($index, $userIdps) ? _("manage") : _("view")) - . ")" - . (empty($listOfSilverbulletRealms) ? "" : "
  • " ) - . implode("
  • ", $listOfSilverbulletRealms) - . (empty($listOfSilverbulletRealms) ? "" : "
    • " ) - . "
"; @@ -376,9 +375,9 @@ /* echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "-" ) - . " " - . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-" ) - . " "; + . " " + . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "-" ) + . " "; * */ echo ""; @@ -402,17 +401,17 @@ if (\config\Master::DB['enforce-external-sync']) { echo ""; if ($readonly === FALSE) { - echo "
-   "; + echo " +   "; } switch ($idpLinked) { case 'nosync': break; case 'linked': -// echo "
" . _("Linked") . "
"; +// echo "
"._("Linked")."
"; break; case 'notlinked': - echo "" . _("NOT linked") . ""; + echo ""._("NOT linked").""; break; } echo "
"; @@ -422,9 +421,9 @@ echo "
"; if ($readonly === FALSE) { echo "
-
+
"; @@ -437,7 +436,7 @@ echo "
" . - sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . " + sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
" . - $oneinvite['name'] . " + $oneinvite['name']." " . - $oneinvite['mail'] . " + $oneinvite['mail']." "; if ($readonly === FALSE) { echo "
- - " - . sprintf(_("(expires %s)"), $oneinvite['expiry']) - . "
"; + + " + . sprintf(_("(expires %s)"), $oneinvite['expiry']) + . ""; } echo "