From 62bd4505ceebb3529387a3adffadc0a3d4cfe0bc Mon Sep 17 00:00:00 2001 From: Thijs Kinkhorst <thijs@kinkhorst.com> Date: Fri, 2 Jan 2015 16:00:16 +0000 Subject: [PATCH] protectmetadata was not enforced for SP metadata. This check was not ported to the saml2 module. --- modules/saml/www/sp/metadata.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/saml/www/sp/metadata.php b/modules/saml/www/sp/metadata.php index becac2d2d..80033a782 100644 --- a/modules/saml/www/sp/metadata.php +++ b/modules/saml/www/sp/metadata.php @@ -5,6 +5,9 @@ if (!array_key_exists('PATH_INFO', $_SERVER)) { } $config = SimpleSAML_Configuration::getInstance(); +if ($config->getBoolean('admin.protectmetadata', false)) { + SimpleSAML_Utilities::requireAdmin(); +} $sourceId = substr($_SERVER['PATH_INFO'], 1); $source = SimpleSAML_Auth_Source::getById($sourceId); if ($source === NULL) { -- GitLab