From 615a80915b9292961baf3456f46fbdb62a2cfb5c Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Tue, 15 Mar 2011 14:29:12 +0000
Subject: [PATCH] saml:PersistentNameID: Return NULL when we have more than one
 uid-attribute.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2779 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/saml/lib/Auth/Process/PersistentNameID.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/saml/lib/Auth/Process/PersistentNameID.php b/modules/saml/lib/Auth/Process/PersistentNameID.php
index 5d44689bd..fd94c59d6 100644
--- a/modules/saml/lib/Auth/Process/PersistentNameID.php
+++ b/modules/saml/lib/Auth/Process/PersistentNameID.php
@@ -60,6 +60,7 @@ class sspmod_saml_Auth_Process_PersistentNameID extends sspmod_saml_BaseNameIDGe
 		}
 		if (count($state['Attributes'][$this->attribute]) > 1) {
 			SimpleSAML_Logger::warning('More than one value in attribute ' . var_export($this->attribute, TRUE) . ' on user - not generating persistent NameID.');
+			return NULL;
 		}
 		$uid = array_values($state['Attributes'][$this->attribute]); /* Just in case the first index is no longer 0. */
 		$uid = $uid[0];
-- 
GitLab