roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.88k stars 1.64k forks source link

Failed login timeout too long #7754

Closed ibizara closed 3 years ago

ibizara commented 3 years ago

When logging in accidentally with the wrong password the failed login would appear promptly on v1.4.7, however on v1.4.9 it takes a good 25 seconds to return failed login due to the 5 attempts that are made.

The value of the attempts to try might be good if it was a variable in the config.

...
[29-Nov-2020 13:08:01 +0000]: <7bvs9pmc> Connecting to IMAP server attempt:5
[29-Nov-2020 13:08:01 +0000]: <7bvs9pmc> [9504] Connecting to localhost:143...
[29-Nov-2020 13:08:01 +0000]: <7bvs9pmc> [9504] S: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot (Debian) ready.
[29-Nov-2020 13:08:01 +0000]: <7bvs9pmc> [9504] C: A0011 ID ("name" "Roundcube" "version" "1.4.9" "php" "7.3.19-1~deb10u1" "os" "Linux" "command" "/webmail/?_task=login")
[29-Nov-2020 13:08:01 +0000]: <7bvs9pmc> [9504] S: * ID ("name" "Dovecot")
[29-Nov-2020 13:08:01 +0000]: <7bvs9pmc> [9504] S: A0011 OK ID completed.
[29-Nov-2020 13:08:01 +0000]: <7bvs9pmc> [9504] C: A0012 AUTHENTICATE PLAIN ****** [25]
[29-Nov-2020 13:08:03 +0000]: <7bvs9pmc> [9504] S: A0012 NO [AUTHENTICATIONFAILED] Authentication failed.

v1.4.9 program/lib/Roundcube/rcube_imap.php Line 167 } while(!$this->conn->connected() && $data['attempt'] < 6);

v1.4.7 program/lib/Roundcube/rcube_imap.php Line 163 } while(!$this->conn->connected() && $data['retry']);

alecpl commented 3 years ago

https://github.com/roundcube/roundcubemail/blob/22bdb65bbf4e933cdac44b5a7988d00a9ba05993/program/lib/Roundcube/rcube_imap.php#L163

ibizara commented 3 years ago

I found that the Roundcube v1.4.9 debian package has a patch which caused the issue, it can be found at https://packages.debian.org/buster-backports/roundcube in a file named retry_to_reach_imap_server.patch

https://github.com/roundcube/roundcubemail/pull/7402