From 1ee76a627626cdf5f899030fdd8a3618f3804048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Fri, 31 Oct 2008 23:48:08 +0000 Subject: [PATCH] Fix bug in generation of getTargetedID in consent module. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@965 44740490-163a-0410-bde0-09ae8108e29a --- modules/consent/lib/Auth/Process/Consent.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/consent/lib/Auth/Process/Consent.php b/modules/consent/lib/Auth/Process/Consent.php index 07c361fc7..0d2f2c1bd 100644 --- a/modules/consent/lib/Auth/Process/Consent.php +++ b/modules/consent/lib/Auth/Process/Consent.php @@ -100,9 +100,7 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt $this->store = NULL; if (array_key_exists('store', $config)) { try { - SimpleSAML_Logger::error('Consent - constructor() : Before creation'); $this->store = sspmod_consent_Store::parseStoreConfig($config['store']); - SimpleSAML_Logger::error('Consent - constructor() : After creation'); } catch(Exception $e) { SimpleSAML_Logger::error('Consent - constructor() : Could not create consent storage: ' . $e->getMessage()); } @@ -133,6 +131,11 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt $source = $state['Source']['metadata-set'] . '|' . $state['Source']['entityid']; $destination = $state['Destination']['metadata-set'] . '|' . $state['Destination']['entityid']; + SimpleSAML_Logger::debug('Consent - userid : ' . $state['UserID']); + SimpleSAML_Logger::debug('Consent - source : ' . $source); + SimpleSAML_Logger::debug('Consent - destination : ' . $destination); + + $userId = self::getHashedUserID($state['UserID'], $source); $targetedId = self::getTargetedID($state['UserID'], $source, $destination); $attributeSet = self::getAttributeHash($state['Attributes'], $this->includeValues); @@ -171,7 +174,7 @@ class sspmod_consent_Auth_Process_Consent extends SimpleSAML_Auth_ProcessingFilt /** * Get a targeted ID. An identifier that is unique per SP entity ID. */ - public function getTargetedID($userid, $destination) { + public function getTargetedID($userid, $source, $destination) { return hash('sha1', $userid . '|' . SimpleSAML_Utilities::getSecretSalt() . '|' . $source . '|' . $destination); } -- GitLab