Skip to content

Commit

Permalink
generate valid Guid to match the validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ishannz committed Nov 23, 2023
1 parent 81d60dc commit faaeb60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Control/SAMLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ public function acs()
return $this->getRedirect();
}

$this->extend('updateGuid', $guid);

$attributes = $auth->getAttributes();

// Allows setups that map GUID (email format) to email {@see SAMLConfiguration::$expose_guid_as_attribute}.
Expand All @@ -163,6 +161,7 @@ public function acs()
}

$this->extend('updateAttributes', $attributes);
$this->extend('updateGuid', $guid);

$fieldToClaimMap = array_flip(Member::config()->claims_field_mappings);

Expand Down
2 changes: 1 addition & 1 deletion src/Helpers/SAMLHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function binToStrGuid($object_guid)
$hex_guid_to_guid_str .= substr($hex_guid, 16 - 2 * $k, 2);
}
$hex_guid_to_guid_str .= '-' . substr($hex_guid, 16, 4);
$hex_guid_to_guid_str .= '-' . substr($hex_guid, 20);
$hex_guid_to_guid_str .= '-' . substr($hex_guid, 20, 12);
return strtoupper($hex_guid_to_guid_str);
}

Expand Down

0 comments on commit faaeb60

Please sign in to comment.