Opened 8 years ago

Closed 5 years ago

#1484661 closed Feature Patches (fixed)

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)

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 (4)

comment:1 Changed 8 years 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 [3b7a5fba]. There was another cookie problem solved with [e4867ea7].

comment:2 Changed 8 years ago by thomasb

  • Resolution set to fixed
  • Status changed from new to closed

Fixed.

comment:3 Changed 5 years ago by gjs@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 5 years ago by thomasb

  • Resolution set to fixed
  • Status changed from reopened to closed

Please provide a comment when reopening tickets.

Note: See TracTickets for help on using tickets.