When we enable ssl for login/purchase related requests. it usually lose session when moving from ssl to non-ssl which might lead to you lost login status.
Workaround is to disable the session transition in cake core.
Below workaround works for cake1.3.4:
Cake was switching the session.cookie_secure ini value on-the-fly while under SSL connections automatically, So the cookie being created was a secure cookie, which the second page wouldn't recognize.
Solution, comment out /cake/lib/cake_session.php line 420 ish:
ini_set('session.cookie_secure', 1);
SSL登录问题
本文解决了一个在启用SSL的情况下,从SSL连接切换到非SSL连接时,因会话丢失而导致登录状态失效的问题。具体解决方案是在cake_session.php中注释掉一行代码,以避免在SSL连接下动态更改session.cookie_secure设置。
395

被折叠的 条评论
为什么被折叠?



