Skip to content
Snippets Groups Projects
Commit 1ee76a62 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Fix bug in generation of getTargetedID in consent module.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@965 44740490-163a-0410-bde0-09ae8108e29a
parent 8909446a
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment