summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorTim van Dijen <tvdijen@gmail.com>2016-03-18 19:27:09 +0100
committerTim van Dijen <tvdijen@gmail.com>2016-03-18 19:27:09 +0100
commit8aac150fb4fd6f0e14a0e4aaebebb67342dae403 (patch)
tree8998b50729c6217b635851feec9aae7120bc485b /modules
parentbcd7240cbb0b8aff58d721d4919295358e9e5785 (diff)
downloadsimplesamlphp-8aac150fb4fd6f0e14a0e4aaebebb67342dae403.zip
simplesamlphp-8aac150fb4fd6f0e14a0e4aaebebb67342dae403.tar.gz
simplesamlphp-8aac150fb4fd6f0e14a0e4aaebebb67342dae403.tar.bz2
Fix typo + authentication-failure on empty attributes-array
An empty array shouldn't lead to an aborted logon. Example when we try to get the 'mail' attribute: UserA has a value set in the mail-attribute and passes the test -> Negotiate logon succeeds UserB has an empty mail-attribute and fails the test -> Negotiate logon fails and the user has to log on manually (fallback to LDAP is initiated)
Diffstat (limited to 'modules')
-rw-r--r--modules/negotiate/lib/Auth/Source/Negotiate.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/negotiate/lib/Auth/Source/Negotiate.php b/modules/negotiate/lib/Auth/Source/Negotiate.php
index 2a5667e..a226302 100644
--- a/modules/negotiate/lib/Auth/Source/Negotiate.php
+++ b/modules/negotiate/lib/Auth/Source/Negotiate.php
@@ -116,9 +116,9 @@ class sspmod_negotiate_Auth_Source_Negotiate extends SimpleSAML_Auth_Source
assert('FALSE');
}
- SimpleSAML\Logger::debug('Negotiate - authenticate(): looking for Negotate');
+ SimpleSAML\Logger::debug('Negotiate - authenticate(): looking for Negotiate');
if (!empty($_SERVER['HTTP_AUTHORIZATION'])) {
- SimpleSAML\Logger::debug('Negotiate - authenticate(): Negotate found');
+ SimpleSAML\Logger::debug('Negotiate - authenticate(): Negotiate found');
$this->ldap = new SimpleSAML_Auth_LDAP(
$this->hostname,
$this->enableTLS,
@@ -151,7 +151,7 @@ class sspmod_negotiate_Auth_Source_Negotiate extends SimpleSAML_Auth_Source
$user = $auth->getAuthenticatedUser();
SimpleSAML\Logger::info('Negotiate - authenticate(): '.$user.' authenticated.');
$lookup = $this->lookupUserData($user);
- if ($lookup) {
+ if ($lookup !== null) {
$state['Attributes'] = $lookup;
// Override the backend so logout will know what to look for
$state['LogoutState'] = array(