diff --git a/modules/silauth/src/Auth/Source/system/System.php b/modules/silauth/src/Auth/Source/system/System.php index fd54055..fb8d558 100644 --- a/modules/silauth/src/Auth/Source/system/System.php +++ b/modules/silauth/src/Auth/Source/system/System.php @@ -4,10 +4,8 @@ use Psr\Log\LoggerInterface; use Psr\Log\NullLogger; -use SimpleSAML\Module\silauth\Auth\Source\auth\IdBroker; -use SimpleSAML\Module\silauth\Auth\Source\config\ConfigManager; +use SimpleSAML\Configuration; use SimpleSAML\Module\silauth\Auth\Source\models\FailedLoginIpAddress; -use \SimpleSAML\Configuration; use Throwable; class System @@ -46,7 +44,7 @@ protected function isRequiredConfigPresent(): bool * HTTP_HOST value (provided by the user's request) is used to * build a trusted URL (see SimpleSaml\Module::authenticate()). */ - $baseURL = $globalConfig->getString('baseurlpath', ''); + $baseURL = $globalConfig->getOptionalString('baseurlpath', ''); $avoidsSecurityHole = (preg_match('#^https?://.*/$#D', $baseURL) === 1); if (!$avoidsSecurityHole) { $this->logError('isRequiredConfigPresent failed: baseurlpath (' . $baseURL . ') does not meet requirements'); diff --git a/modules/sildisco/public/metadata.php b/modules/sildisco/public/metadata.php index fb03e42..45f7464 100644 --- a/modules/sildisco/public/metadata.php +++ b/modules/sildisco/public/metadata.php @@ -6,10 +6,9 @@ require_once('../public/_include.php'); use SAML2\Constants; -use SimpleSAML\Utils\Auth as Auth; +use SimpleSAML\Utils\Config\Metadata as Metadata; use SimpleSAML\Utils\Crypto as Crypto; use SimpleSAML\Utils\HTTP as HTTP; -use SimpleSAML\Utils\Config\Metadata as Metadata; // load SimpleSAMLphp, configuration and metadata $config = \SimpleSAML\Configuration::getInstance(); @@ -135,7 +134,7 @@ )); } - $metaArray['NameIDFormat'] = $idpmeta->getString( + $metaArray['NameIDFormat'] = $idpmeta->getOptionalString( 'NameIDFormat', 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient' ); @@ -193,10 +192,10 @@ } } - $technicalContactEmail = $config->getString('technicalcontact_email', false); + $technicalContactEmail = $config->getOptionalString('technicalcontact_email', false); if ($technicalContactEmail && $technicalContactEmail !== 'na@example.org') { $techcontact['emailAddress'] = $technicalContactEmail; - $techcontact['name'] = $config->getString('technicalcontact_name', null); + $techcontact['name'] = $config->getOptionalString('technicalcontact_name', null); $techcontact['contactType'] = 'technical'; $metaArray['contacts'][] = Metadata::getContact($techcontact); }