diff --git a/docs/source/simplesamlphp-sp.xml b/docs/source/simplesamlphp-sp.xml index ad82586a9c321c10dca996fd76388bd6904e7312..35a05fa867af86dfd98b9928eac481504f29ab54 100644 --- a/docs/source/simplesamlphp-sp.xml +++ b/docs/source/simplesamlphp-sp.xml @@ -7,7 +7,7 @@ <articleinfo> <date>2007-10-15</date> - <pubdate>Wed Feb 6 14:26:51 2008</pubdate> + <pubdate>Fri Feb 1 08:44:40 2008</pubdate> <author> <firstname>Andreas Ă…kre</firstname> diff --git a/lib/SimpleSAML/Auth/LDAP.php b/lib/SimpleSAML/Auth/LDAP.php index a159f3e99ae0f6bf265b055304fa916a71345a8e..d0436b516b312a80de1b858025b8968d5fd15bc5 100644 --- a/lib/SimpleSAML/Auth/LDAP.php +++ b/lib/SimpleSAML/Auth/LDAP.php @@ -17,7 +17,7 @@ class SimpleSAML_Auth_LDAP { /** * LDAP link */ - private static $ldap = null; + private $ldap = null; /** @@ -30,7 +30,7 @@ class SimpleSAML_Auth_LDAP { */ public function __construct($hostname) { - if (!isset($this->logger)) $this->logger = new SimpleSAML_Logger(); + if (!isset(self::$logger)) self::$logger = new SimpleSAML_Logger(); $this->ldap = @ldap_connect($hostname); diff --git a/lib/SimpleSAML/Session.php b/lib/SimpleSAML/Session.php index 8ad2f0db8369972d2148467d34c12d6072fc0126..35d9e27efcb5eb0d0edee9a83edb8d3310b95e40 100644 --- a/lib/SimpleSAML/Session.php +++ b/lib/SimpleSAML/Session.php @@ -69,7 +69,7 @@ class SimpleSAML_Session { */ private function __construct($authenticated = true) { - if (!isset($this->logger)) $this->logger = new SimpleSAML_Logger(); + if (!isset(self::$logger)) self::$logger = new SimpleSAML_Logger(); $this->authenticated = $authenticated; if ($authenticated) { @@ -215,7 +215,7 @@ class SimpleSAML_Session { public function getAuthnRequest($protocol, $requestid) { - $this->logger->log(LOG_DEBUG, $this->getTrackID(), 'Library', 'Session', 'DEBUG', $requestid, + self::$logger->log(LOG_DEBUG, $this->getTrackID(), 'Library', 'Session', 'DEBUG', $requestid, 'Get authnrequest from cache ' . $protocol . ' time:' . time() . ' id: '. $requestid ); $configuration = SimpleSAML_Configuration::getInstance(); @@ -230,7 +230,7 @@ class SimpleSAML_Session { */ if ($cache['date'] < time() - $configuration->getValue('session.requestcache', 4*(60*60)) ) { - $this->logger->log(LOG_DEBUG, $this->getTrackID(), 'Library', 'Session', 'DEBUG', $id, + self::$logger->log(LOG_DEBUG, $this->getTrackID(), 'Library', 'Session', 'DEBUG', $id, 'Deleting expired authn request with id ' . $id); unset($this->authnrequests[$protocol][$id]); } @@ -258,7 +258,7 @@ class SimpleSAML_Session { */ public function setAuthnRequest($protocol, $requestid, array $cache) { - $this->logger->log(LOG_DEBUG, $this->getTrackID(), 'Library', 'Session', 'DEBUG', $requestid, + self::$logger->log(LOG_DEBUG, $this->getTrackID(), 'Library', 'Session', 'DEBUG', $requestid, 'Set authnrequest ' . $protocol . ' time:' . time() . ' size:' . count($cache) . ' id: '. $requestid ); $this->dirty = true; @@ -378,7 +378,7 @@ class SimpleSAML_Session { */ public function clean($cleancache = false) { - $this->logger->log(LOG_DEBUG, $this->getTrackID(), 'Library', 'Session', 'DEBUG', '-', + self::$logger->log(LOG_DEBUG, $this->getTrackID(), 'Library', 'Session', 'DEBUG', '-', 'Cleaning Session. Clean cache: ' . ($cleancache ? 'yes' : 'no') ); if ($cleancache) { diff --git a/www/auth/login-feide.php b/www/auth/login-feide.php index 394ac3ad9a70b1f2a62e2e60df19649533a37604..72a6016868b10822927455b84378c68645149fa7 100644 --- a/www/auth/login-feide.php +++ b/www/auth/login-feide.php @@ -103,14 +103,14 @@ if (isset($_REQUEST['username'])) { * Bind as user */ if (!$ldap->bind($dn, $password)) { - $logger->log(LOG_NOTICE, $session->getTrackID(), 'AUTH', 'ldap-feide', 'Fail', $username, $username . ' failed to authenticate. DN=' . $dn); + $logger->log(LOG_NOTICE, $session->getTrackID(), 'AUTH', 'ldap-feide', 'Fail', $requestedUser, $requestedUser . ' failed to authenticate. DN=' . $dn); throw new Exception('Wrong username or password'); } // Retrieve attributes from LDAP $attributes = $ldap->getAttributes($dn, $ldapconfig['attributes']); - $logger->log(LOG_NOTICE, $session->getTrackID(), 'AUTH', 'ldap-feide', 'OK', $username, $username . ' successfully authenticated'); + $logger->log(LOG_NOTICE, $session->getTrackID(), 'AUTH', 'ldap-feide', 'OK', $requestedUser, $requestedUser . ' successfully authenticated'); $session->setAuthenticated(true, 'login-feide'); $session->setAttributes($attributes); @@ -124,7 +124,8 @@ if (isset($_REQUEST['username'])) { } catch (Exception $e) { - $logger->log(LOG_ERR, $session->getTrackID(), 'AUTH', 'ldap-feide', 'ERROR', $username, $e->getMessage()); + $logger->log(LOG_ERR, $session->getTrackID(), 'AUTH', 'ldap-feide', 'ERROR', + (isset($requestedUser) ? $requestedUser : 'na'), $e->getMessage()); $error = $e->getMessage(); }