diff --git a/lib/SimpleSAML/Auth/LDAP.php b/lib/SimpleSAML/Auth/LDAP.php index 0f3dc49307ffc26f4720bb189ceafd0811e6cf3d..b106079f8201e00a9e09795205afd290564d55ea 100644 --- a/lib/SimpleSAML/Auth/LDAP.php +++ b/lib/SimpleSAML/Auth/LDAP.php @@ -58,7 +58,7 @@ class SimpleSAML_Auth_LDAP { public function __construct($hostname, $enable_tls = TRUE, $debug = FALSE, $timeout = 0, $port = 389, $referrals = TRUE) { // Debug - SimpleSAML_Logger::debug('Library - LDAP __construct(): Setup LDAP with ' . + SimpleSAML\Logger::debug('Library - LDAP __construct(): Setup LDAP with ' . 'host=\'' . $hostname . '\', tls=' . var_export($enable_tls, true) . ', debug=' . var_export($debug, true) . @@ -72,7 +72,7 @@ class SimpleSAML_Auth_LDAP { * OpenLDAP 2.x.x or Netscape Directory SDK x.x needed for this option. */ if ($debug && !ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7)) { - SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set debug level (LDAP_OPT_DEBUG_LEVEL) to 7'); + SimpleSAML\Logger::warning('Library - LDAP __construct(): Unable to set debug level (LDAP_OPT_DEBUG_LEVEL) to 7'); } /* @@ -99,10 +99,10 @@ class SimpleSAML_Auth_LDAP { $this->timeout = $timeout; if ($timeout > 0) { if (!@ldap_set_option($this->ldap, LDAP_OPT_NETWORK_TIMEOUT, $timeout)) { - SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to ' . $timeout); + SimpleSAML\Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to ' . $timeout); } if (!@ldap_set_option($this->ldap, LDAP_OPT_TIMELIMIT, $timeout)) { - SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_TIMELIMIT) to ' . $timeout); + SimpleSAML\Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_TIMELIMIT) to ' . $timeout); } } @@ -128,7 +128,7 @@ class SimpleSAML_Auth_LDAP { // Log LDAP code and description, if possible if (empty($this->ldap)) { - SimpleSAML_Logger::error($description); + SimpleSAML\Logger::error($description); } else { $errNo = @ldap_errno($this->ldap); } @@ -137,9 +137,9 @@ class SimpleSAML_Auth_LDAP { if ($type) { if ($errNo !== 0) { // Only log real LDAP errors; not success - SimpleSAML_Logger::error($description . '; cause: \'' . ldap_error($this->ldap) . '\' (0x' . dechex($errNo) . ')'); + SimpleSAML\Logger::error($description . '; cause: \'' . ldap_error($this->ldap) . '\' (0x' . dechex($errNo) . ')'); } else { - SimpleSAML_Logger::error($description); + SimpleSAML\Logger::error($description); } switch ($type) { @@ -163,16 +163,16 @@ class SimpleSAML_Auth_LDAP { } switch ($errNo) { case 0x20://LDAP_NO_SUCH_OBJECT - SimpleSAML_Logger::warning($description); + SimpleSAML\Logger::warning($description); return new SimpleSAML_Error_UserNotFound($description, $errNo); case 0x31://LDAP_INVALID_CREDENTIALS - SimpleSAML_Logger::info($description); + SimpleSAML\Logger::info($description); return new SimpleSAML_Error_InvalidCredential($description, $errNo); case -1://NO_SERVER_CONNECTION - SimpleSAML_Logger::error($description); + SimpleSAML\Logger::error($description); return new SimpleSAML_Error_AuthSource('ldap', $description); default: - SimpleSAML_Logger::error($description); + SimpleSAML\Logger::error($description); return new SimpleSAML_Error_AuthSource('ldap', $description); } } @@ -219,7 +219,7 @@ class SimpleSAML_Auth_LDAP { } // Search using generated filter - SimpleSAML_Logger::debug('Library - LDAP search(): Searching base \'' . $base . '\' for \'' . $filter . '\''); + SimpleSAML\Logger::debug('Library - LDAP search(): Searching base \'' . $base . '\' for \'' . $filter . '\''); // TODO: Should aliases be dereferenced? $result = @ldap_search($this->ldap, $base, $filter, array(), 0, 0, $this->timeout); if ($result === FALSE) { @@ -296,7 +296,7 @@ class SimpleSAML_Auth_LDAP { } } // Decide what to do for zero entries - SimpleSAML_Logger::debug('Library - LDAP searchfordn(): No entries found'); + SimpleSAML\Logger::debug('Library - LDAP searchfordn(): No entries found'); if ($allowZeroHits) { // Zero hits allowed return NULL; @@ -450,7 +450,7 @@ class SimpleSAML_Auth_LDAP { if ($error === TRUE) { // Good $this->authz_id = $authz_id; - SimpleSAML_Logger::debug('Library - LDAP bind(): Bind successful with DN \'' . $dn . '\''); + SimpleSAML\Logger::debug('Library - LDAP bind(): Bind successful with DN \'' . $dn . '\''); return TRUE; } @@ -497,7 +497,7 @@ class SimpleSAML_Auth_LDAP { } // Log debug message - SimpleSAML_Logger::debug( + SimpleSAML\Logger::debug( 'ldap:LdapConnection->setOption : Set the LDAP option [' . $option . '] with the value [' . $value . ']' ); @@ -531,7 +531,7 @@ class SimpleSAML_Auth_LDAP { // TODO: Verify that this originally was the intended behaviour. Could $attributes be a string? $attributes = array(); } - SimpleSAML_Logger::debug('Library - LDAP getAttributes(): Getting ' . $description . ' from DN \'' . $dn . '\''); + SimpleSAML\Logger::debug('Library - LDAP getAttributes(): Getting ' . $description . ' from DN \'' . $dn . '\''); // Attempt to get attributes // TODO: Should aliases be dereferenced? @@ -563,7 +563,7 @@ class SimpleSAML_Auth_LDAP { if (!empty($maxsize) && strlen($value) >= $maxsize) { // Ignoring and warning - SimpleSAML_Logger::warning('Library - LDAP getAttributes(): Attribute \'' . + SimpleSAML\Logger::warning('Library - LDAP getAttributes(): Attribute \'' . $name . '\' exceeded maximum allowed size by ' + ($maxsize - strlen($value))); continue; } @@ -583,7 +583,7 @@ class SimpleSAML_Auth_LDAP { } // We're done - SimpleSAML_Logger::debug('Library - LDAP getAttributes(): Found attributes \'(' . join(',', array_keys($result)) . ')\''); + SimpleSAML\Logger::debug('Library - LDAP getAttributes(): Found attributes \'(' . join(',', array_keys($result)) . ')\''); return $result; } @@ -618,7 +618,7 @@ class SimpleSAML_Auth_LDAP { if ($password !== null) { // checking users credentials ... assuming below that she may read her own attributes ... if (!$this->bind($dn, $password)) { - SimpleSAML_Logger::info('Library - LDAP validate(): Failed to authenticate \''. $username . '\' using DN \'' . $dn . '\''); + SimpleSAML\Logger::info('Library - LDAP validate(): Failed to authenticate \''. $username . '\' using DN \'' . $dn . '\''); return FALSE; } } diff --git a/lib/SimpleSAML/Auth/ProcessingChain.php b/lib/SimpleSAML/Auth/ProcessingChain.php index 9f9da145fe97e67b783646a6ddd9c650cba61a7a..8a718524c9b34a36af09a410d7434a4d188a6d3d 100644 --- a/lib/SimpleSAML/Auth/ProcessingChain.php +++ b/lib/SimpleSAML/Auth/ProcessingChain.php @@ -70,7 +70,7 @@ class SimpleSAML_Auth_ProcessingChain { } - SimpleSAML_Logger::debug('Filter config for ' . $idpMetadata['entityid'] . '->' . + SimpleSAML\Logger::debug('Filter config for ' . $idpMetadata['entityid'] . '->' . $spMetadata['entityid'] . ': ' . str_replace("\n", '', var_export($this->filters, TRUE))); } @@ -148,7 +148,7 @@ class SimpleSAML_Auth_ProcessingChain { if (!array_key_exists('class', $config)) throw new Exception('Authentication processing filter without name given.'); - $className = SimpleSAML_Module::resolveClass($config['class'], 'Auth_Process', 'SimpleSAML_Auth_ProcessingFilter'); + $className = SimpleSAML\Module::resolveClass($config['class'], 'Auth_Process', 'SimpleSAML_Auth_ProcessingFilter'); $config['%priority'] = $priority; unset($config['class']); return new $className($config, NULL); @@ -323,10 +323,10 @@ class SimpleSAML_Auth_ProcessingChain { if (isset($state['Destination']['userid.attribute'])) { $attributeName = $state['Destination']['userid.attribute']; - SimpleSAML_Logger::warning("The 'userid.attribute' option has been deprecated."); + SimpleSAML\Logger::warning("The 'userid.attribute' option has been deprecated."); } elseif (isset($state['Source']['userid.attribute'])) { $attributeName = $state['Source']['userid.attribute']; - SimpleSAML_Logger::warning("The 'userid.attribute' option has been deprecated."); + SimpleSAML\Logger::warning("The 'userid.attribute' option has been deprecated."); } else { // Default attribute $attributeName = 'eduPersonPrincipalName'; @@ -338,12 +338,12 @@ class SimpleSAML_Auth_ProcessingChain { $uid = $state['Attributes'][$attributeName]; if (count($uid) === 0) { - SimpleSAML_Logger::warning('Empty user id attribute [' . $attributeName . '].'); + SimpleSAML\Logger::warning('Empty user id attribute [' . $attributeName . '].'); return; } if (count($uid) > 1) { - SimpleSAML_Logger::warning('Multiple attribute values for user id attribute [' . $attributeName . '].'); + SimpleSAML\Logger::warning('Multiple attribute values for user id attribute [' . $attributeName . '].'); } $uid = $uid[0]; diff --git a/lib/SimpleSAML/Auth/Simple.php b/lib/SimpleSAML/Auth/Simple.php index 32c5bb9f46829300a987d8b7a419b7f7bbaa9a01..32080c4794bc9f4b37a225087c84e105e98b62b5 100644 --- a/lib/SimpleSAML/Auth/Simple.php +++ b/lib/SimpleSAML/Auth/Simple.php @@ -297,7 +297,7 @@ class SimpleSAML_Auth_Simple { $returnTo = \SimpleSAML\Utils\HTTP::getSelfURL(); } - $login = SimpleSAML_Module::getModuleURL('core/as_login.php', array( + $login = SimpleSAML\Module::getModuleURL('core/as_login.php', array( 'AuthId' => $this->authSource, 'ReturnTo' => $returnTo, )); @@ -320,7 +320,7 @@ class SimpleSAML_Auth_Simple { $returnTo = \SimpleSAML\Utils\HTTP::getSelfURL(); } - $logout = SimpleSAML_Module::getModuleURL('core/as_logout.php', array( + $logout = SimpleSAML\Module::getModuleURL('core/as_logout.php', array( 'AuthId' => $this->authSource, 'ReturnTo' => $returnTo, )); diff --git a/lib/SimpleSAML/Auth/Source.php b/lib/SimpleSAML/Auth/Source.php index b9cceb41eb472aa6075cfe12646b84803a1264eb..122263ea3d8e025c30eaeee1c14e985f69279b38 100644 --- a/lib/SimpleSAML/Auth/Source.php +++ b/lib/SimpleSAML/Auth/Source.php @@ -295,7 +295,7 @@ abstract class SimpleSAML_Auth_Source self::validateSource($config, $authId); - $className = SimpleSAML_Module::resolveClass($config[0], 'Auth_Source', 'SimpleSAML_Auth_Source'); + $className = SimpleSAML\Module::resolveClass($config[0], 'Auth_Source', 'SimpleSAML_Auth_Source'); $info = array('AuthId' => $authId); unset($config[0]); @@ -369,7 +369,7 @@ abstract class SimpleSAML_Auth_Source $session = SimpleSAML_Session::getSessionFromRequest(); if (!$session->isValid($source)) { - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( 'Received logout from an invalid authentication source '. var_export($source, true) ); diff --git a/lib/SimpleSAML/Auth/State.php b/lib/SimpleSAML/Auth/State.php index 1063046956feb91b1bf6c234d486744b8b36784b..b08b5a11c387f0a2562ad5bee63000069b83f787 100644 --- a/lib/SimpleSAML/Auth/State.php +++ b/lib/SimpleSAML/Auth/State.php @@ -200,7 +200,7 @@ class SimpleSAML_Auth_State { $session = SimpleSAML_Session::getSessionFromRequest(); $session->setData('SimpleSAML_Auth_State', $id, $serializedState, self::getStateTimeout()); - SimpleSAML_Logger::debug('Saved state: ' . var_export($return, TRUE)); + SimpleSAML\Logger::debug('Saved state: ' . var_export($return, TRUE)); return $return; } @@ -221,9 +221,9 @@ class SimpleSAML_Auth_State { $clonedState[self::CLONE_ORIGINAL_ID] = $state[self::ID]; unset($clonedState[self::ID]); - SimpleSAML_Logger::debug('Cloned state: ' . var_export($state[self::ID], TRUE)); + SimpleSAML\Logger::debug('Cloned state: ' . var_export($state[self::ID], TRUE)); } else { - SimpleSAML_Logger::debug('Cloned state with undefined id.'); + SimpleSAML\Logger::debug('Cloned state with undefined id.'); } return $clonedState; @@ -246,7 +246,7 @@ class SimpleSAML_Auth_State { assert('is_string($id)'); assert('is_string($stage)'); assert('is_bool($allowMissing)'); - SimpleSAML_Logger::debug('Loading state: ' . var_export($id, TRUE)); + SimpleSAML\Logger::debug('Loading state: ' . var_export($id, TRUE)); $sid = self::parseStateID($id); @@ -281,7 +281,7 @@ class SimpleSAML_Auth_State { $msg = 'Wrong stage in state. Was \'' . $state[self::STAGE] . '\', should be \'' . $stage . '\'.'; - SimpleSAML_Logger::warning($msg); + SimpleSAML\Logger::warning($msg); if ($sid['url'] === NULL) { throw new Exception($msg); @@ -309,7 +309,7 @@ class SimpleSAML_Auth_State { return; } - SimpleSAML_Logger::debug('Deleting state: ' . var_export($state[self::ID], TRUE)); + SimpleSAML\Logger::debug('Deleting state: ' . var_export($state[self::ID], TRUE)); $session = SimpleSAML_Session::getSessionFromRequest(); $session->deleteData('SimpleSAML_Auth_State', $state[self::ID]); diff --git a/lib/SimpleSAML/Error/Error.php b/lib/SimpleSAML/Error/Error.php index 69662ab94c670b276c43c8a0566f9e2725fdccad..eb21fc578ceabd4adc0de24b6d81ec8b03819202 100644 --- a/lib/SimpleSAML/Error/Error.php +++ b/lib/SimpleSAML/Error/Error.php @@ -192,7 +192,7 @@ class SimpleSAML_Error_Error extends SimpleSAML_Error_Exception if (!array_key_exists($this->httpCode, $httpCodesMap)) { $httpCode = 500; - SimpleSAML_Logger::warning('HTTP response code not defined: '.var_export($this->httpCode, true)); + SimpleSAML\Logger::warning('HTTP response code not defined: '.var_export($this->httpCode, true)); } header($httpCodesMap[$httpCode]); @@ -211,7 +211,7 @@ class SimpleSAML_Error_Error extends SimpleSAML_Error_Exception $etrace = implode("\n", $data); $reportId = bin2hex(openssl_random_pseudo_bytes(4)); - SimpleSAML_Logger::error('Error report with id '.$reportId.' generated.'); + SimpleSAML\Logger::error('Error report with id '.$reportId.' generated.'); $config = SimpleSAML_Configuration::getInstance(); $session = SimpleSAML_Session::getSessionFromRequest(); diff --git a/lib/SimpleSAML/Error/Exception.php b/lib/SimpleSAML/Error/Exception.php index 2872b335a9a98c0ce7e046d344aa45e4247c9a04..55b86ae148722aa56857d4c75ec68c7de647b407 100644 --- a/lib/SimpleSAML/Error/Exception.php +++ b/lib/SimpleSAML/Error/Exception.php @@ -184,7 +184,7 @@ class SimpleSAML_Error_Exception extends Exception $lines = $this->format(); foreach ($lines as $line) { - SimpleSAML_Logger::error($line); + SimpleSAML\Logger::error($line); } } @@ -199,7 +199,7 @@ class SimpleSAML_Error_Exception extends Exception $lines = $this->format(); foreach ($lines as $line) { - SimpleSAML_Logger::warning($line); + SimpleSAML\Logger::warning($line); } } @@ -214,7 +214,7 @@ class SimpleSAML_Error_Exception extends Exception $lines = $this->format(); foreach ($lines as $line) { - SimpleSAML_Logger::debug($line); + SimpleSAML\Logger::debug($line); } } @@ -229,7 +229,7 @@ class SimpleSAML_Error_Exception extends Exception $lines = $this->format(); foreach ($lines as $line) { - SimpleSAML_Logger::debug($line); + SimpleSAML\Logger::debug($line); } } diff --git a/lib/SimpleSAML/IdP.php b/lib/SimpleSAML/IdP.php index 86cf72e83c4a3786c44a3ed87177246146796256..a43b48c3ae05c654eab89d3f91775df060c35aaf 100644 --- a/lib/SimpleSAML/IdP.php +++ b/lib/SimpleSAML/IdP.php @@ -492,7 +492,7 @@ class SimpleSAML_IdP // terminate the local session $id = SimpleSAML_Auth_State::saveState($state, 'core:Logout:afterbridge'); - $returnTo = SimpleSAML_Module::getModuleURL('core/idp/resumelogout.php', array('id' => $id)); + $returnTo = SimpleSAML\Module::getModuleURL('core/idp/resumelogout.php', array('id' => $id)); $this->authSource->logout($returnTo); diff --git a/lib/SimpleSAML/IdP/LogoutIFrame.php b/lib/SimpleSAML/IdP/LogoutIFrame.php index dd31d4c73db617352f9beff557fac1eb9a6f81a4..b4948a0577f61f389979165e7a616216ad3b60e2 100644 --- a/lib/SimpleSAML/IdP/LogoutIFrame.php +++ b/lib/SimpleSAML/IdP/LogoutIFrame.php @@ -50,7 +50,7 @@ class SimpleSAML_IdP_LogoutIFrame extends SimpleSAML_IdP_LogoutHandler $params['type'] = $state['core:Logout-IFrame:InitType']; } - $url = SimpleSAML_Module::getModuleURL('core/idp/logout-iframe.php', $params); + $url = SimpleSAML\Module::getModuleURL('core/idp/logout-iframe.php', $params); \SimpleSAML\Utils\HTTP::redirectTrustedURL($url); } diff --git a/lib/SimpleSAML/IdP/LogoutTraditional.php b/lib/SimpleSAML/IdP/LogoutTraditional.php index 1160908da877587b714f39adcff947cf34b05845..ee7a45f2ebdb6024d8f3cd8bd9f5a62621d1d4a4 100644 --- a/lib/SimpleSAML/IdP/LogoutTraditional.php +++ b/lib/SimpleSAML/IdP/LogoutTraditional.php @@ -26,14 +26,14 @@ class SimpleSAML_IdP_LogoutTraditional extends SimpleSAML_IdP_LogoutHandler $relayState = SimpleSAML_Auth_State::saveState($state, 'core:LogoutTraditional', true); $id = $association['id']; - SimpleSAML_Logger::info('Logging out of '.var_export($id, true).'.'); + SimpleSAML\Logger::info('Logging out of '.var_export($id, true).'.'); try { $idp = SimpleSAML_IdP::getByState($association); $url = call_user_func(array($association['Handler'], 'getLogoutURL'), $idp, $association, $relayState); \SimpleSAML\Utils\HTTP::redirectTrustedURL($url); } catch (Exception $e) { - SimpleSAML_Logger::warning('Unable to initialize logout to '.var_export($id, true).'.'); + SimpleSAML\Logger::warning('Unable to initialize logout to '.var_export($id, true).'.'); $this->idp->terminateAssociation($id); $state['core:Failed'] = true; @@ -83,10 +83,10 @@ class SimpleSAML_IdP_LogoutTraditional extends SimpleSAML_IdP_LogoutHandler $state = SimpleSAML_Auth_State::loadState($relayState, 'core:LogoutTraditional'); if ($error === null) { - SimpleSAML_Logger::info('Logged out of '.var_export($assocId, true).'.'); + SimpleSAML\Logger::info('Logged out of '.var_export($assocId, true).'.'); $this->idp->terminateAssociation($assocId); } else { - SimpleSAML_Logger::warning('Error received from '.var_export($assocId, true).' during logout:'); + SimpleSAML\Logger::warning('Error received from '.var_export($assocId, true).' during logout:'); $error->logWarning(); $state['core:Failed'] = true; } diff --git a/lib/SimpleSAML/Logger/LoggingHandlerErrorLog.php b/lib/SimpleSAML/Logger/LoggingHandlerErrorLog.php index 8104286ab6a01f49375a9cc195ff327e5a987b1d..119027a75c4edf599a95aef1a992b7b719ec590b 100644 --- a/lib/SimpleSAML/Logger/LoggingHandlerErrorLog.php +++ b/lib/SimpleSAML/Logger/LoggingHandlerErrorLog.php @@ -16,14 +16,14 @@ class SimpleSAML_Logger_LoggingHandlerErrorLog implements SimpleSAML_Logger_Logg * This array contains the mappings from syslog loglevel to names. */ private static $levelNames = array( - SimpleSAML_Logger::EMERG => 'EMERG', - SimpleSAML_Logger::ALERT => 'ALERT', - SimpleSAML_Logger::CRIT => 'CRIT', - SimpleSAML_Logger::ERR => 'ERR', - SimpleSAML_Logger::WARNING => 'WARNING', - SimpleSAML_Logger::NOTICE => 'NOTICE', - SimpleSAML_Logger::INFO => 'INFO', - SimpleSAML_Logger::DEBUG => 'DEBUG', + SimpleSAML\Logger::EMERG => 'EMERG', + SimpleSAML\Logger::ALERT => 'ALERT', + SimpleSAML\Logger::CRIT => 'CRIT', + SimpleSAML\Logger::ERR => 'ERR', + SimpleSAML\Logger::WARNING => 'WARNING', + SimpleSAML\Logger::NOTICE => 'NOTICE', + SimpleSAML\Logger::INFO => 'INFO', + SimpleSAML\Logger::DEBUG => 'DEBUG', ); private $format; diff --git a/lib/SimpleSAML/Logger/LoggingHandlerFile.php b/lib/SimpleSAML/Logger/LoggingHandlerFile.php index f765c3e249ab67d1e44c9a54815d7e6223607200..b09993cca7dd3fad170df4d53c38c9ec64cd9e87 100644 --- a/lib/SimpleSAML/Logger/LoggingHandlerFile.php +++ b/lib/SimpleSAML/Logger/LoggingHandlerFile.php @@ -16,14 +16,14 @@ class SimpleSAML_Logger_LoggingHandlerFile implements SimpleSAML_Logger_LoggingH * more or less directly from SimpleSAML_Logger_LoggingHandlerErrorLog. */ private static $levelNames = array( - SimpleSAML_Logger::EMERG => 'EMERGENCY', - SimpleSAML_Logger::ALERT => 'ALERT', - SimpleSAML_Logger::CRIT => 'CRITICAL', - SimpleSAML_Logger::ERR => 'ERROR', - SimpleSAML_Logger::WARNING => 'WARNING', - SimpleSAML_Logger::NOTICE => 'NOTICE', - SimpleSAML_Logger::INFO => 'INFO', - SimpleSAML_Logger::DEBUG => 'DEBUG', + SimpleSAML\Logger::EMERG => 'EMERGENCY', + SimpleSAML\Logger::ALERT => 'ALERT', + SimpleSAML\Logger::CRIT => 'CRITICAL', + SimpleSAML\Logger::ERR => 'ERROR', + SimpleSAML\Logger::WARNING => 'WARNING', + SimpleSAML\Logger::NOTICE => 'NOTICE', + SimpleSAML\Logger::INFO => 'INFO', + SimpleSAML\Logger::DEBUG => 'DEBUG', ); private $logFile = NULL; private $processname = NULL; diff --git a/lib/SimpleSAML/Memcache.php b/lib/SimpleSAML/Memcache.php index 9eb628f186b8354cc8de49f379e09d61198e8c65..a7caceb4aee4df7cc2e195f6965a2178ceebf88d 100644 --- a/lib/SimpleSAML/Memcache.php +++ b/lib/SimpleSAML/Memcache.php @@ -37,7 +37,7 @@ class SimpleSAML_Memcache */ public static function get($key) { - SimpleSAML_Logger::debug("loading key $key from memcache"); + SimpleSAML\Logger::debug("loading key $key from memcache"); $latestInfo = null; $latestTime = 0.0; @@ -68,19 +68,19 @@ class SimpleSAML_Memcache * - 'data': The data. */ if (!is_array($info)) { - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( 'Retrieved invalid data from a memcache server. Data was not an array.' ); continue; } if (!array_key_exists('timestamp', $info)) { - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( 'Retrieved invalid data from a memcache server. Missing timestamp.' ); continue; } if (!array_key_exists('data', $info)) { - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( 'Retrieved invalid data from a memcache server. Missing data.' ); continue; @@ -117,13 +117,13 @@ class SimpleSAML_Memcache throw new SimpleSAML_Error_Exception('All memcache servers are down', 503, $e); } // we didn't find any data matching the key - SimpleSAML_Logger::debug("key $key not found in memcache"); + SimpleSAML\Logger::debug("key $key not found in memcache"); return null; } if ($mustUpdate) { // we found data matching the key, but some of the servers need updating - SimpleSAML_Logger::debug("Memcache servers out of sync for $key, forcing sync"); + SimpleSAML\Logger::debug("Memcache servers out of sync for $key, forcing sync"); self::set($key, $latestData); } @@ -140,7 +140,7 @@ class SimpleSAML_Memcache */ public static function set($key, $value, $expire = null) { - SimpleSAML_Logger::debug("saving key $key to memcache"); + SimpleSAML\Logger::debug("saving key $key to memcache"); $savedInfo = array( 'timestamp' => microtime(true), 'data' => $value @@ -167,7 +167,7 @@ class SimpleSAML_Memcache public static function delete($key) { assert('is_string($key)'); - SimpleSAML_Logger::debug("deleting key $key from memcache"); + SimpleSAML\Logger::debug("deleting key $key from memcache"); // store this object to all groups of memcache servers foreach (self::getMemcacheServers() as $server) { diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php index 5c1c6e89d9255e540e67275ad4d631b707f22757..18083c27aa3509de7138da9391e4b7fc4605bad9 100644 --- a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php +++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php @@ -150,7 +150,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandler if (array_key_exists('expire', $le)) { if ($le['expire'] < time()) { unset($srcList[$key]); - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( "Dropping metadata entity ".var_export($key, true).", expired ". SimpleSAML\Utils\Time::generateTimestamp($le['expire'])."." ); diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerMDX.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerMDX.php index c06a9e04b2ccef96ffa036f51e00a2b8e16b2597..4800d74ab990ae002437ba192f8899574d173b94 100644 --- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerMDX.php +++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerMDX.php @@ -148,7 +148,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_ if (!is_readable($cachefilename)) { throw new Exception('Could not read cache file for entity ['.$cachefilename.']'); } - SimpleSAML_Logger::debug('MetaData - Handler.MDX: Reading cache ['.$entityId.'] => ['.$cachefilename.']'); + SimpleSAML\Logger::debug('MetaData - Handler.MDX: Reading cache ['.$entityId.'] => ['.$cachefilename.']'); /* Ensure that this metadata isn't older that the cachelength option allows. This * must be verified based on the file, since this option may be changed after the @@ -156,7 +156,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_ */ $stat = stat($cachefilename); if ($stat['mtime'] + $this->cacheLength <= time()) { - SimpleSAML_Logger::debug('MetaData - Handler.MDX: Cache file older that the cachelength option allows.'); + SimpleSAML\Logger::debug('MetaData - Handler.MDX: Cache file older that the cachelength option allows.'); return null; } @@ -204,7 +204,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_ if (!is_writable(dirname($cachefilename))) { throw new Exception('Could not write cache file for entity ['.$cachefilename.']'); } - SimpleSAML_Logger::debug('MetaData - Handler.MDX: Writing cache ['.$entityId.'] => ['.$cachefilename.']'); + SimpleSAML\Logger::debug('MetaData - Handler.MDX: Writing cache ['.$entityId.'] => ['.$cachefilename.']'); file_put_contents($cachefilename, serialize($data)); } @@ -236,7 +236,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_ return $ret[0]; default: - SimpleSAML_Logger::warning('MetaData - Handler.MDX: Unknown metadata set: '.$set); + SimpleSAML\Logger::warning('MetaData - Handler.MDX: Unknown metadata set: '.$set); } return null; @@ -265,7 +265,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_ assert('is_string($index)'); assert('is_string($set)'); - SimpleSAML_Logger::info('MetaData - Handler.MDX: Loading metadata entity ['.$index.'] from ['.$set.']'); + SimpleSAML\Logger::info('MetaData - Handler.MDX: Loading metadata entity ['.$index.'] from ['.$set.']'); // read from cache if possible $data = $this->getFromCache($set, $index); @@ -277,18 +277,18 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_ if (isset($data)) { // metadata found in cache and not expired - SimpleSAML_Logger::debug('MetaData - Handler.MDX: Using cached metadata for: '.$index.'.'); + SimpleSAML\Logger::debug('MetaData - Handler.MDX: Using cached metadata for: '.$index.'.'); return $data; } // look at Metadata Query Protocol: https://github.com/iay/md-query/blob/master/draft-young-md-query.txt $mdx_url = $this->server.'/entities/'.urlencode($index); - SimpleSAML_Logger::debug('MetaData - Handler.MDX: Downloading metadata for "'.$index.'" from ['.$mdx_url.']'); + SimpleSAML\Logger::debug('MetaData - Handler.MDX: Downloading metadata for "'.$index.'" from ['.$mdx_url.']'); try { $xmldata = \SimpleSAML\Utils\HTTP::fetch($mdx_url); } catch (Exception $e) { - SimpleSAML_Logger::warning('Fetching metadata for '.$index.': '.$e->getMessage()); + SimpleSAML\Logger::warning('Fetching metadata for '.$index.': '.$e->getMessage()); } if (empty($xmldata)) { @@ -300,7 +300,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerMDX extends SimpleSAML_Metadata_ /** @var string $xmldata */ $entity = SimpleSAML_Metadata_SAMLParser::parseString($xmldata); - SimpleSAML_Logger::debug('MetaData - Handler.MDX: Completed parsing of ['.$mdx_url.']'); + SimpleSAML\Logger::debug('MetaData - Handler.MDX: Completed parsing of ['.$mdx_url.']'); if ($this->validateFingerprint !== null) { if (!$entity->validateFingerprint($this->validateFingerprint)) { diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php index 0b70e7797f2601028f34f3977feaf9bb9d23e5de..a34f194913e09d352fb79e98bef0e20181321e89 100644 --- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php +++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerSerialize.php @@ -77,7 +77,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met $dh = @opendir($this->directory); if ($dh === false) { - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( 'Serialize metadata handler: Unable to open directory: '.var_export($this->directory, true) ); return $ret; @@ -93,7 +93,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met $path = $this->directory.'/'.$entry; if (!is_dir($path)) { - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( 'Serialize metadata handler: Metadata directory contained a file where only directories should '. 'exist: '.var_export($path, true) ); @@ -130,7 +130,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met $dh = @opendir($dir); if ($dh === false) { - SimpleSAML_Logger::warning('Serialize metadata handler: Unable to open directory: '.var_export($dir, true)); + SimpleSAML\Logger::warning('Serialize metadata handler: Unable to open directory: '.var_export($dir, true)); return $ret; } @@ -183,7 +183,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met $data = @file_get_contents($filePath); if ($data === false) { $error = error_get_last(); - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( 'Error reading file '.$filePath.': '.$error['message'] ); return null; @@ -191,7 +191,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met $data = @unserialize($data); if ($data === false) { - SimpleSAML_Logger::warning('Error unserializing file: '.$filePath); + SimpleSAML\Logger::warning('Error unserializing file: '.$filePath); return null; } @@ -219,30 +219,30 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met $dir = dirname($filePath); if (!is_dir($dir)) { - SimpleSAML_Logger::info('Creating directory: '.$dir); + SimpleSAML\Logger::info('Creating directory: '.$dir); $res = @mkdir($dir, 0777, true); if ($res === false) { $error = error_get_last(); - SimpleSAML_Logger::error('Failed to create directory '.$dir.': '.$error['message']); + SimpleSAML\Logger::error('Failed to create directory '.$dir.': '.$error['message']); return false; } } $data = serialize($metadata); - SimpleSAML_Logger::debug('Writing: '.$newPath); + SimpleSAML\Logger::debug('Writing: '.$newPath); $res = file_put_contents($newPath, $data); if ($res === false) { $error = error_get_last(); - SimpleSAML_Logger::error('Error saving file '.$newPath.': '.$error['message']); + SimpleSAML\Logger::error('Error saving file '.$newPath.': '.$error['message']); return false; } $res = rename($newPath, $filePath); if ($res === false) { $error = error_get_last(); - SimpleSAML_Logger::error('Error renaming '.$newPath.' to '.$filePath.': '.$error['message']); + SimpleSAML\Logger::error('Error renaming '.$newPath.' to '.$filePath.': '.$error['message']); return false; } @@ -264,7 +264,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met $filePath = $this->getMetadataPath($entityId, $set); if (!file_exists($filePath)) { - SimpleSAML_Logger::warning( + SimpleSAML\Logger::warning( 'Attempted to erase nonexistent metadata entry '. var_export($entityId, true).' in set '.var_export($set, true).'.' ); @@ -274,7 +274,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerSerialize extends SimpleSAML_Met $res = unlink($filePath); if ($res === false) { $error = error_get_last(); - SimpleSAML_Logger::error( + SimpleSAML\Logger::error( 'Failed to delete file '.$filePath. ': '.$error['message'] ); diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/lib/SimpleSAML/Metadata/SAMLBuilder.php index 59b3264042aa4bf3bcac9318e7d032bc3697b2fe..0d8f0e65fdcb3524ba7f69a1cf2b08c95128dc3e 100644 --- a/lib/SimpleSAML/Metadata/SAMLBuilder.php +++ b/lib/SimpleSAML/Metadata/SAMLBuilder.php @@ -454,7 +454,7 @@ class SimpleSAML_Metadata_SAMLBuilder $this->addAttributeAuthority($metadata); break; default: - SimpleSAML_Logger::warning('Unable to generate metadata for unknown type \''.$set.'\'.'); + SimpleSAML\Logger::warning('Unable to generate metadata for unknown type \''.$set.'\'.'); } } diff --git a/lib/SimpleSAML/Module.php b/lib/SimpleSAML/Module.php index ef0d9d0d043cab0511982bb90a421d1d315d5697..c9ff286f1c99c988e594b6497e29629cbbcec0ff 100644 --- a/lib/SimpleSAML/Module.php +++ b/lib/SimpleSAML/Module.php @@ -47,7 +47,7 @@ class Module $nspath = join('\\', $path); if (class_exists('SimpleSAML\Module\\'.$module.'\\'.$nspath)) { // the class has been migrated, create an alias and warn about it - \SimpleSAML_Logger::warning( + \SimpleSAML\Logger::warning( "The class '$className' is now using namespaces, please use 'SimpleSAML\\Module\\$module\\". "$nspath' instead." ); @@ -145,7 +145,7 @@ class Module !file_exists($moduleDir.'/default-enable') && !file_exists($moduleDir.'/default-disable') ) { - \SimpleSAML_Logger::error("Missing default-enable or default-disable file for the module $module"); + \SimpleSAML\Logger::error("Missing default-enable or default-disable file for the module $module"); } if (file_exists($moduleDir.'/enable')) { diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index d0a5214680b6c3f18f1ffb564f181f17ca617f02..592414190d99249445fef6f634dfcd663fb6e2b2 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -142,7 +142,7 @@ class SimpleSAML_Session if ($transient) { // transient session $sh = SimpleSAML_SessionHandler::getSessionHandler(); $this->trackid = 'TR'.bin2hex(openssl_random_pseudo_bytes(4)); - SimpleSAML_Logger::setTrackId($this->trackid); + SimpleSAML\Logger::setTrackId($this->trackid); $this->transient = true; /* @@ -159,7 +159,7 @@ class SimpleSAML_Session $this->sessionId = $sh->newSessionId(); $this->trackid = bin2hex(openssl_random_pseudo_bytes(5)); - SimpleSAML_Logger::setTrackId($this->trackid); + SimpleSAML\Logger::setTrackId($this->trackid); $this->markDirty(); @@ -195,7 +195,7 @@ class SimpleSAML_Session // for some reason, we were unable to initialize this session, use a transient session instead self::useTransientSession(); - SimpleSAML_Logger::error('Error loading session: '.$e->getMessage()); + SimpleSAML\Logger::error('Error loading session: '.$e->getMessage()); if ($e instanceof SimpleSAML_Error_Exception) { $cause = $e->getCause(); if ($cause instanceof Exception) { @@ -268,11 +268,11 @@ class SimpleSAML_Session 'SimpleSAMLAuthToken' ); if (!isset($_COOKIE[$authTokenCookieName])) { - SimpleSAML_Logger::warning('Missing AuthToken cookie.'); + SimpleSAML\Logger::warning('Missing AuthToken cookie.'); return null; } if ($_COOKIE[$authTokenCookieName] !== $session->authToken) { - SimpleSAML_Logger::warning('Invalid AuthToken cookie.'); + SimpleSAML\Logger::warning('Invalid AuthToken cookie.'); return null; } } @@ -283,7 +283,7 @@ class SimpleSAML_Session assert('is_callable($checkFunction)'); $check = call_user_func($checkFunction, $session); if ($check !== true) { - SimpleSAML_Logger::warning('Session did not pass check function.'); + SimpleSAML\Logger::warning('Session did not pass check function.'); return null; } } @@ -307,7 +307,7 @@ class SimpleSAML_Session */ private static function load(SimpleSAML_Session $session) { - SimpleSAML_Logger::setTrackId($session->getTrackID()); + SimpleSAML\Logger::setTrackId($session->getTrackID()); self::$instance = $session; return self::$instance; } @@ -365,7 +365,7 @@ class SimpleSAML_Session if (!($e instanceof SimpleSAML_Error_Exception)) { $e = new SimpleSAML_Error_UnserializableException($e); } - SimpleSAML_Logger::error('Unable to save session.'); + SimpleSAML\Logger::error('Unable to save session.'); $e->logError(); } } @@ -480,7 +480,7 @@ class SimpleSAML_Session assert('is_string($authority)'); assert('is_array($data) || is_null($data)'); - SimpleSAML_Logger::debug('Session: doLogin("'.$authority.'")'); + SimpleSAML\Logger::debug('Session: doLogin("'.$authority.'")'); $this->markDirty(); @@ -533,10 +533,10 @@ class SimpleSAML_Session */ public function doLogout($authority) { - SimpleSAML_Logger::debug('Session: doLogout('.var_export($authority, true).')'); + SimpleSAML\Logger::debug('Session: doLogout('.var_export($authority, true).')'); if (!isset($this->authData[$authority])) { - SimpleSAML_Logger::debug('Session: Already logged out of '.$authority.'.'); + SimpleSAML\Logger::debug('Session: Already logged out of '.$authority.'.'); return; } @@ -600,7 +600,7 @@ class SimpleSAML_Session assert('is_string($authority)'); if (!isset($this->authData[$authority])) { - SimpleSAML_Logger::debug( + SimpleSAML\Logger::debug( 'Session: '.var_export($authority, true). ' not valid because we are not authenticated.' ); @@ -608,11 +608,11 @@ class SimpleSAML_Session } if ($this->authData[$authority]['Expire'] <= time()) { - SimpleSAML_Logger::debug('Session: '.var_export($authority, true).' not valid because it is expired.'); + SimpleSAML\Logger::debug('Session: '.var_export($authority, true).' not valid because it is expired.'); return false; } - SimpleSAML_Logger::debug('Session: Valid session found with '.var_export($authority, true).'.'); + SimpleSAML\Logger::debug('Session: Valid session found with '.var_export($authority, true).'.'); return true; } diff --git a/lib/SimpleSAML/Stats.php b/lib/SimpleSAML/Stats.php index 42bd72cf5cbc514f065d6ffe03cbdc8cd7db138f..6c962f0151771dbae8ea97cc1ecf1b18b1372742 100644 --- a/lib/SimpleSAML/Stats.php +++ b/lib/SimpleSAML/Stats.php @@ -37,7 +37,7 @@ class SimpleSAML_Stats private static function createOutput(SimpleSAML_Configuration $config) { $cls = $config->getString('class'); - $cls = SimpleSAML_Module::resolveClass($cls, 'Stats_Output', 'SimpleSAML_Stats_Output'); + $cls = SimpleSAML\Module::resolveClass($cls, 'Stats_Output', 'SimpleSAML_Stats_Output'); $output = new $cls($config); return $output; diff --git a/lib/SimpleSAML/Store.php b/lib/SimpleSAML/Store.php index 3d638d88a57c09a2e41c121210b6b7c27ece689c..914b6b687119c64a6c5e6c22159fea4037a424e7 100644 --- a/lib/SimpleSAML/Store.php +++ b/lib/SimpleSAML/Store.php @@ -50,7 +50,7 @@ abstract class SimpleSAML_Store break; default: // datastore from module - $className = SimpleSAML_Module::resolveClass($storeType, 'Store', 'SimpleSAML_Store'); + $className = SimpleSAML\Module::resolveClass($storeType, 'Store', 'SimpleSAML_Store'); self::$instance = new $className(); } diff --git a/lib/SimpleSAML/Store/SQL.php b/lib/SimpleSAML/Store/SQL.php index 2766892c3eb8d58cf141c0460c8af99b5af6b430..9a3666a7c7fdbf6ef2aa66efd28db5270545681b 100644 --- a/lib/SimpleSAML/Store/SQL.php +++ b/lib/SimpleSAML/Store/SQL.php @@ -180,7 +180,7 @@ class SimpleSAML_Store_SQL extends SimpleSAML_Store { case '23505': // PostgreSQL break; default: - SimpleSAML_Logger::error('Error while saving data: ' . $e->getMessage()); + SimpleSAML\Logger::error('Error while saving data: ' . $e->getMessage()); throw $e; } } @@ -209,7 +209,7 @@ class SimpleSAML_Store_SQL extends SimpleSAML_Store { */ private function cleanKVStore() { - SimpleSAML_Logger::debug('store.sql: Cleaning key-value store.'); + SimpleSAML\Logger::debug('store.sql: Cleaning key-value store.'); $query = 'DELETE FROM ' . $this->prefix . '_kvstore WHERE _expire < :now'; $params = array('now' => gmdate('Y-m-d H:i:s')); diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index d0e33ee4ab43b819717eebac30ce315c13b3c54b..e0f0754d0c500f98502c4a9af66e9fb910a39cbf 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -13,7 +13,7 @@ class SimpleSAML_Utilities { /** - * @deprecated This property will be removed in SSP 2.0. Please use SimpleSAML_Logger::isErrorMasked() instead. + * @deprecated This property will be removed in SSP 2.0. Please use SimpleSAML\Logger::isErrorMasked() instead. */ public static $logMask = 0; @@ -213,7 +213,7 @@ class SimpleSAML_Utilities } if (strlen($url) > 2048) { - SimpleSAML_Logger::warning('Redirecting to a URL longer than 2048 bytes.'); + SimpleSAML\Logger::warning('Redirecting to a URL longer than 2048 bytes.'); } // Set the location header @@ -571,7 +571,7 @@ class SimpleSAML_Utilities $redirInfo = base64_encode(SimpleSAML\Utils\Crypto::aesEncrypt($session->getSessionId().':'.$postId)); - $url = SimpleSAML_Module::getModuleURL('core/postredirect.php', array('RedirInfo' => $redirInfo)); + $url = SimpleSAML\Module::getModuleURL('core/postredirect.php', array('RedirInfo' => $redirInfo)); $url = preg_replace("#^https:#", "http:", $url); return $url; @@ -615,20 +615,20 @@ class SimpleSAML_Utilities /** - * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML_Logger::maskErrors() instead. + * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML\Logger::maskErrors() instead. */ public static function maskErrors($mask) { - SimpleSAML_Logger::maskErrors($mask); + SimpleSAML\Logger::maskErrors($mask); } /** - * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML_Logger::popErrorMask() instead. + * @deprecated This method will be removed in SSP 2.0. Please use SimpleSAML\Logger::popErrorMask() instead. */ public static function popErrorMask() { - SimpleSAML_Logger::popErrorMask(); + SimpleSAML\Logger::popErrorMask(); } diff --git a/lib/SimpleSAML/Utils/Config/Metadata.php b/lib/SimpleSAML/Utils/Config/Metadata.php index 1615ef64bdd6c8d4f7ef034e93c40d0e7f20f95d..d9f93283520931b807bf1492e78d905d7e149984 100644 --- a/lib/SimpleSAML/Utils/Config/Metadata.php +++ b/lib/SimpleSAML/Utils/Config/Metadata.php @@ -257,9 +257,9 @@ class Metadata */ public static function isHiddenFromDiscovery(array $metadata) { - \SimpleSAML_Logger::maskErrors(E_ALL); + \SimpleSAML\Logger::maskErrors(E_ALL); $hidden = in_array(self::$HIDE_FROM_DISCOVERY, $metadata['EntityAttributes'][self::$ENTITY_CATEGORY]); - \SimpleSAML_Logger::popErrorMask(); + \SimpleSAML\Logger::popErrorMask(); if (is_bool($hidden)) { return $hidden; } diff --git a/lib/SimpleSAML/XHTML/EMail.php b/lib/SimpleSAML/XHTML/EMail.php index b4b5ef02a8e31243f87fa42e3ec4f80861773cee..335df2bf40b397780bb1e3a4ec164f6864e32232 100644 --- a/lib/SimpleSAML/XHTML/EMail.php +++ b/lib/SimpleSAML/XHTML/EMail.php @@ -92,7 +92,7 @@ Content-Transfer-Encoding: 8bit $headers = implode("\n", $this->headers); $mail_sent = @mail($this->to, $this->subject, $message, $headers); - SimpleSAML_Logger::debug('Email: Sending e-mail to [' . $this->to . '] : ' . ($mail_sent ? 'OK' : 'Failed')); + SimpleSAML\Logger::debug('Email: Sending e-mail to [' . $this->to . '] : ' . ($mail_sent ? 'OK' : 'Failed')); if (!$mail_sent) throw new Exception('Error when sending e-mail'); } diff --git a/lib/SimpleSAML/XHTML/IdPDisco.php b/lib/SimpleSAML/XHTML/IdPDisco.php index 065e2e50d113103f3e120859823ca30096448df9..a71193e869da36af455e7930fe8f945bda81d4f7 100644 --- a/lib/SimpleSAML/XHTML/IdPDisco.php +++ b/lib/SimpleSAML/XHTML/IdPDisco.php @@ -175,7 +175,7 @@ class SimpleSAML_XHTML_IdPDisco */ protected function log($message) { - SimpleSAML_Logger::info('idpDisco.'.$this->instance.': '.$message); + SimpleSAML\Logger::info('idpDisco.'.$this->instance.': '.$message); } diff --git a/lib/SimpleSAML/XML/Validator.php b/lib/SimpleSAML/XML/Validator.php index 555578600300b643f102931b74e83077967ae0bd..545f3dfc4cfc2c6e8db63675ca1c2826fa7bd482 100644 --- a/lib/SimpleSAML/XML/Validator.php +++ b/lib/SimpleSAML/XML/Validator.php @@ -401,22 +401,22 @@ class SimpleSAML_XML_Validator { throw new Exception('Could not load CA file: ' . $caFile); } - SimpleSAML_Logger::debug('Validating certificate against CA file: ' . var_export($caFile, TRUE)); + SimpleSAML\Logger::debug('Validating certificate against CA file: ' . var_export($caFile, TRUE)); $resBuiltin = self::validateCABuiltIn($certificate, $caFile); if ($resBuiltin !== TRUE) { - SimpleSAML_Logger::debug('Failed to validate with internal function: ' . var_export($resBuiltin, TRUE)); + SimpleSAML\Logger::debug('Failed to validate with internal function: ' . var_export($resBuiltin, TRUE)); $resExternal = self::validateCAExec($certificate, $caFile); if ($resExternal !== TRUE) { - SimpleSAML_Logger::debug('Failed to validate with external function: ' . var_export($resExternal, TRUE)); + SimpleSAML\Logger::debug('Failed to validate with external function: ' . var_export($resExternal, TRUE)); throw new Exception('Could not verify certificate against CA file "' . $caFile . '". Internal result:' . $resBuiltin . ' External result:' . $resExternal); } } - SimpleSAML_Logger::debug('Successfully validated certificate.'); + SimpleSAML\Logger::debug('Successfully validated certificate.'); } }