mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-02-17 06:43:56 +00:00
Improve authentication failure detection with word boundaries in regex
Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
This commit is contained in:
@@ -182,7 +182,7 @@ while ($row = $sth->fetchrow_arrayref()) {
|
|||||||
my $stdout = $run_imapsync->('utf8');
|
my $stdout = $run_imapsync->('utf8');
|
||||||
|
|
||||||
# Check if authentication failed
|
# Check if authentication failed
|
||||||
my $auth_failed = ($stdout =~ /LOGIN failed|authentication failed|AUTHENTICATIONFAILED/i);
|
my $auth_failed = ($stdout =~ /\b(LOGIN failed|authentication failed|AUTHENTICATIONFAILED)\b/i);
|
||||||
|
|
||||||
# If authentication failed with UTF-8, retry with Latin-1 encoding for legacy passwords
|
# If authentication failed with UTF-8, retry with Latin-1 encoding for legacy passwords
|
||||||
if ($auth_failed) {
|
if ($auth_failed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user