Skip to content

Commit 6c6b6b3

Browse files
committed
Use randomness from a CSPRNG to generate unique IDs for assertions
1 parent ca87a2a commit 6c6b6b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Saml2/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ public static function extractOriginalQueryParam($name)
743743
*/
744744
public static function generateUniqueID()
745745
{
746-
return 'ONELOGIN_' . sha1(uniqid((string)mt_rand(), true));
746+
return 'ONELOGIN_' . sha1(random_bytes(20));
747747
}
748748

749749
/**

0 commit comments

Comments
 (0)