Session not saving when moving from ssl to non-ssl

后端 未结 7 1120
我在风中等你
我在风中等你 2020-12-31 15:17

I have a login screen that I force to be ssl, so like this: https://www.foobar.com/login then after they login, they get moved to the homepage: https://www.foobar.com/dashba

7条回答
  •  抹茶落季
    2020-12-31 15:57

    I figured this out. 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/session.php line 420 ish:

    ini_set('session.cookie_secure', 1);

    (Just search for that to find it, as I'm sure the line # will change as releases come out.)

提交回复
热议问题