Skip to content

Commit a33dd71

Browse files
authored
Fix MockArraySessionStorage to generate more conform ids
1 parent cf4893c commit a33dd71

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Session/Storage/MockArraySessionStorage.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,11 @@ public function getMetadataBag()
226226
/**
227227
* Generates a session ID.
228228
*
229-
* This doesn't need to be particularly cryptographically secure since this is just
230-
* a mock.
231-
*
232229
* @return string
233230
*/
234231
protected function generateId()
235232
{
236-
return hash('sha256', uniqid('ss_mock_', true));
233+
return bin2hex(random_bytes(16));
237234
}
238235

239236
protected function loadSession()

0 commit comments

Comments
 (0)