2

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?

keepkimi
  • 373
  • 3
  • 12
  • If you haven't played to much with the configuration, sessions use by default the native php ones: http://symfony.com/doc/current/book/controller.html#managing-the-session I guess this is then more a generic php question! – cheesemacfly Apr 17 '13 at 16:54

1 Answers1

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.

Community
  • 1
  • 1
gatisl
  • 1,870
  • 1
  • 16
  • 18
  • 1
    To 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