Author Topic: Unable to login in Firefox  (Read 2232 times)

Offline ghostks

  • Newbie
  • *
  • Posts: 8
Unable to login in Firefox
« on: October 25, 2007, 06:28:54 AM »
Yesterday I've made clean install of the latest RC2 and found interesting issue - I'm unable to login via Firefox. Entering correct login/pass roundcube redirecting me back to the login page. IE/Opera are working perfectly. As I found Firefox couldn't accept/save cookie or something is going wrong in the roundcube and the cookie isn't sent at all. That's why this redirection is happening.

I already saw some topics about this kind of issue with the Firefox but there wasn't any clue/fix for it, so I'll try in the near future (possibly today) to investigate this kind of behaviour. Also will try to use latest SVN build.

Forgot one thing, when I'm clearing cache of the firefox I see message that my browser doesn't accept cookies but only for the first time when page is opened. All next trys just silently redirecting me to the login screen.

Offline ghostks

  • Newbie
  • *
  • Posts: 8
Re: Unable to login in Firefox
« Reply #1 on: October 25, 2007, 03:42:13 PM »
The issue was solved. It was the bug with the cookie handling mechanism in the Roundcube. Some browsers understand multiple cookie setting in one session but it's breaking the idea of cookies. IE/Opera does handle. Firefox is one of them which do not handle such situations. The patch was sent to Devs. If you do need it I can post it here. I suppose it might help solving cookie errors in most browsers.

Regards, Andris

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Re: Unable to login in Firefox
« Reply #2 on: October 25, 2007, 11:56:01 PM »
Patch:
Code: [Select]
--- roundcubemail-0.1-rc2/program/include/session.inc
+++ roundcube_my/program/include/session.inc
@@ -173,6 +173,7 @@

 session_id($random);
 $cookie = session_get_cookie_params();
+ setcookie(session_name(), "", time() -3600);
 setcookie(session_name(), $random, $cookie['lifetime'],
$cookie['path']);

There's the patch ;)

Thanks for your efforts.