Opened 6 years ago
Closed 5 years ago
#1484663 closed Bugs (fixed)
Personal Settings => Folders invalidates session because IMAP auth to dovecot fails
| Reported by: | chasd | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | |
| Component: | IMAP connection | Version: | git-master |
| Severity: | normal | Keywords: | |
| Cc: | chasd@… |
Description (last modified by thomasb)
Using RoundCube trunk r915 20071109, apache 1.3.3x, php 4.4.2, PostgreSQL 7.4.11, dovecot-1.0-0.1.rc7 on Fedora 6 PPC. Camino 1.6a1pre browser on OS X 10.4.9 PPC.
Navigating and using the mail functions is OK. When accessing the "Personal Settings" area, the "Preferences" and "Identities" tabs work OK. Choosing "Folders" results in a significant wait, then "Connection to IMAP server failed." If you go to "Personal Settings" and then click the RoundCube Logo to get back to the mail functions, the result is "Your session is invalid or expired." Other dovecot users have experienced this issue or similar :
<http://roundcubeforum.net/forum/index.php?topic=2196.0>
Instead of commenting out the $username completely, I replaced it with a simpler
"$username = $USER_DATAusername?;"
Errors logged by RoundCube are :
[13-Nov-2007 12:10:48 -0600] IMAP Error: Authentication for chasd@mail.silveroak s.com failed (LOGIN): "a001 NO Authentication failed." in on line 0 [13-Nov-2007 12:21:32 -0600] IMAP Error: Authentication for chasd@mail.silveroak s.com failed (LOGIN): "a001 NO Authentication failed." in on line 0 [13-Nov-2007 12:36:26] PHP Warning: array_flip(): The argument should be an arr ay in /var/www/roundcube/program/include/rcube_imap.inc on line 2497 [13-Nov-2007 12:46:58 -0600] IMAP Error: Authentication for chasd@mail.silveroak s.com failed (LOGIN): "a001 NO Authentication failed." in on line 0 [13-Nov-2007 12:47:16 -0600] IMAP Error: Authentication for chasd@mail.silveroak s.com failed (LOGIN): "a001 NO Authentication failed." in on line 0 [13-Nov-2007 12:47:16] PHP Warning: fputs(): supplied argument is not a valid s tream resource in /var/www/roundcube/program/lib/imap.inc on line 1717 [13-Nov-2007 12:47:16] PHP Warning: Invalid argument supplied for foreach() in /var/www/roundcube/program/include/rcube_imap.inc on line 1586 [13-Nov-2007 12:47:16] PHP Warning: Invalid argument supplied for foreach() in /var/www/roundcube/program/include/rcube_imap.inc on line 2458 [13-Nov-2007 12:47:16] PHP Warning: fputs(): supplied argument is not a valid s tream resource in /var/www/roundcube/program/lib/imap.inc on line 1767 [13-Nov-2007 12:48:34 -0600] IMAP Error: Authentication for chasd@mail.silveroak s.com failed (LOGIN): "a001 NO Authentication failed." in on line 0
It seems like the "$_SESSIONusername?" variable passed to the "connenct" function in index.php is getting stomped on or mangled by the action of setting the $username variable in the title of the page used to display the "Folders" tab of "Personal Settings." It is likely that only dovecot reacts to the change and other IMAP servers don't care.
Attachments (1)
Change History (11)
comment:1 Changed 6 years ago by thomasb
- Description modified (diff)
comment:2 Changed 6 years ago by thomasb
comment:3 Changed 6 years ago by _Petya_
I think this bug must be related: http://trac.roundcube.net/ticket/1484670
thomasb, do you think your patch can fix this other bug?
comment:4 Changed 5 years ago by superswade
I had this exact same issue and the fixusername.diff fix in /program/steps/settings/func.inc worked perfectly for for me! Thanks thomasb
comment:5 Changed 5 years ago by superswade
By the way I'm running RC 0.1-RC2 w/ dovecot v.1.07 IMAP on the new Fedora 8 OS. The RC rpm that was built into the Fedora 8 OS didn't work for me so I downloaded the 0.1-RC2 tar.gz from the roundcube.net site and installed it manually.
Scott
comment:6 Changed 5 years ago by JazzG
Have tried the patch but it doesn't work for me :(
comment:7 Changed 5 years ago by JazzG
The error I get is
[11-Dec-2007 16:33:17 +0000] IMAP Error: Authentication for [my email] failed (LOGIN): "a001 NO LOGIN failed" in on line 0
[11-Dec-2007 16:33:17] PHP Warning: fputs(): supplied argument is not a valid stream resource in /var/www/html/mail/program/lib/imap.inc on line 1717
[11-Dec-2007 16:33:17] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/mail/program/include/rcube_imap.inc on line 1579
[11-Dec-2007 16:33:17] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/mail/program/include/rcube_imap.inc on line 2445
[11-Dec-2007 16:33:17] PHP Warning: fputs(): supplied argument is not a valid stream resource in /var/www/html/mail/program/lib/imap.inc on line 1767
[11-Dec-2007 16:33:17] PHP Warning: fputs(): supplied argument is not a valid stream resource in /var/www/html/mail/program/lib/imap.inc on line 1668
[11-Dec-2007 16:33:23 +0000] IMAP Error: Authentication for [my email] failed (LOGIN): "a001 NO LOGIN failed" in on line 0
comment:8 Changed 5 years ago by JazzG
Ok ignore my last two posts, I have it working now. For some strange reason the file I had uploaded didn't have the changes on them, so I have just uploaded it up again and all is fine now. Sorry about that!
comment:9 Changed 5 years ago by DaxAra
I had the same problem and applied the patch.
it fixed the problem for me as well.
comment:10 Changed 5 years ago by thomasb
- Resolution set to fixed
- Status changed from new to closed
Duplicate of #1484670 and fixed in [82cd5cdb]

I don't think it's related to dovecot but it more looks like PHP automatically writes global vars to the session. Maybe 'register_globals' is turned on?
However this can easily be fixed by applying the attached patch. Please test and confirm if it works.