From 0d2b724b9317bbfddf402279ceff2f523814b8ac Mon Sep 17 00:00:00 2001 From: Robin Bowes Date: Mon, 10 May 2010 10:01:30 +0100 Subject: [PATCH] Check for the exact string resonses from vpopmaild rather than using regexes --- plugins/auth/auth_vpopmaild | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/auth/auth_vpopmaild b/plugins/auth/auth_vpopmaild index 623d919..d30eaed 100644 --- a/plugins/auth/auth_vpopmaild +++ b/plugins/auth/auth_vpopmaild @@ -37,9 +37,7 @@ sub auth_vpopmaild { # Get server greeting (+OK) my $connect_response = <$vpopmaild_socket>; - if (!$connect_response =~ /\+OK.*/) { - return DECLINED; - } + return DECLINED unless $connect_response eq '+OK \r\n'; # send login details print $vpopmaild_socket "login $user $passClear\n\r"; @@ -50,7 +48,7 @@ sub auth_vpopmaild { close($vpopmaild_socket); # check for successful login - if ($login_response =~ /\+OK.*/) { + if ($login_response eq '+OK+\r\n') { return (OK, 'authcheckpassword'); } else {