Check for the exact string resonses from vpopmaild rather than using regexes
This commit is contained in:
parent
e13952164d
commit
0d2b724b93
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user