Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0] Session got lost after redirect #38

Closed
3wv opened this issue Jan 3, 2012 · 2 comments
Closed

[2.0] Session got lost after redirect #38

3wv opened this issue Jan 3, 2012 · 2 comments

Comments

@3wv
Copy link

3wv commented Jan 3, 2012

I run into a situation that I was able to successfully login, but the redirect after the successfull login somehow killed the session.

I had to avoid the redirect and just go manually to the protected pages - then the sessions worked. I figured out that I had to change the Session config in /Config/core.php and use "use_trans_sid" set to true.

Configure::write('Session', array(
    //...,
    'ini' => array('session.use_trans_sid' => true)
));

Did I miss something or is my new session config dangerous?

@burzum
Copy link

burzum commented Jan 20, 2012

You should better not use it http://www.mtdev.com/2002/06/why-you-should-disable-phps-session-use_trans_sid

However, can you please provide a little more info about the redirect? Did you modify any code related to the login? Whats you Auth setup? Did you override the _setupAuth() method from the users controller?

@3wv
Copy link
Author

3wv commented Jan 20, 2012

In the meantime, I have change a lot of things back and forth and it works without setting session.use_trans_sid to true (which wouln't have been a valid option for an app in production).
Unfortenately, I cannot track the real reason for the problem.

@3wv 3wv closed this as completed Jan 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants