From d5524689b400ecbc6cc58253b6a3aac960064693 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Dec 2025 08:16:49 +0000 Subject: [PATCH] Improve authentication failure detection with word boundaries in regex Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com> --- data/Dockerfiles/dovecot/imapsync_runner.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/Dockerfiles/dovecot/imapsync_runner.pl b/data/Dockerfiles/dovecot/imapsync_runner.pl index da03e1d47..f756d0c32 100644 --- a/data/Dockerfiles/dovecot/imapsync_runner.pl +++ b/data/Dockerfiles/dovecot/imapsync_runner.pl @@ -182,7 +182,7 @@ while ($row = $sth->fetchrow_arrayref()) { my $stdout = $run_imapsync->('utf8'); # 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 ($auth_failed) {