Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Symfony generates session ID?

Tags:

symfony

I was wondering how Symfony generates session IDs? I was trying to find a snippet reponsible for it but I couldn't. Does it check for colission before returning ID or is it possible (probably nearly impossible but possible) to generate the same session ID for two users?

like image 821
keepkimi Avatar asked May 07 '26 14:05

keepkimi


1 Answers

You can search for classes which implements SessionStorageInterface.

By default native PHP session storage is used, therefore PHP's session_id() is responsible for generating IDs.

Edit: There is another discussion here about how unique is this native session id.

like image 76
gatisl Avatar answered May 09 '26 04:05

gatisl