Improve authentication failure detection with word boundaries in regex

Co-authored-by: DerLinkman <62480600+DerLinkman@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-15 08:16:49 +00:00
parent 4e12ba99a0
commit d5524689b4

View file

@ -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) {