From cbae1c859d7d656abd5649c67cc52cb690b4d8bb Mon Sep 17 00:00:00 2001 From: Daniel Lysfjord Date: Wed, 10 Apr 2024 19:21:36 +0200 Subject: [PATCH] Limit the regex to the end of line, so we don't get errors regarding PAM Authentication errors with hostnames that start with an ip:) --- lib/ssh_parser.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ssh_parser.pm b/lib/ssh_parser.pm index 15da0a1..c65c78e 100644 --- a/lib/ssh_parser.pm +++ b/lib/ssh_parser.pm @@ -171,7 +171,7 @@ sub parser { m/ ($re_host) /gcix && do { $host = $1; }; - } elsif($string =~ m/Authentication error for( illegal user|) $re_user from $re_host/) { + } elsif($string =~ m/Authentication error for( illegal user|) $re_user from $re_host$/) { $_ = $string; $hostile = 1; $reply = 'Authentication error';