Ticket #1484661 (closed Patches: fixed)

Opened 13 months ago

Last modified 13 months ago

Login redirects to login screen

Reported by: elephant Owned by:
Priority: 8 Milestone: 0.1-stable
Component: Core functionality Version: 0.1-rc2
Severity: major Keywords:
Cc:

Description (last modified by thomasb) (diff)

regarding: login redirects to login screen again, it didn't work for me with firefox and safari (IE was OK)

forum thread: http://roundcubeforum.net/forum/index.php?topic=1898.0

I found a fix for this problem. In program/include/session.inc one can see:

Code:

  $cookie = session_get_cookie_params();
  setcookie(session_name(), $random, $cookie['lifetime'], $cookie['path']);

However, $cookielifetime? means cookie lifetime in seconds and using it like this sets cookie expiration to a few seconds after 1/1/1970, 00:00:00

the line should be: Code:

  setcookie(session_name(), $random, time()+$cookie['lifetime'], $cookie['path']);

it worked well under Firefox and Safari.

Change History

Changed 13 months ago by thomasb

  • description modified (diff)
  • milestone set to 0.1-stable

Usually the session lifetime is set to 0 (session cookie) but you're right, the code does not work if lifetime is > 0. Fixed in r920. There was another cookie problem solved with r911.

Changed 13 months ago by thomasb

  • status changed from new to closed
  • resolution set to fixed

Fixed.

Note: See TracTickets for help on using tickets.