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?
Asked
Active
Viewed 2,899 times
1 Answers
1
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.
-
1To expand on this answer, the default storage handler is named `NativeSessionStorage` in the namespace `Symfony\Component\HttpFoundation\Session\Storage` – Sean Apr 17 '13 at 16:32