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)
|
# Get server greeting (+OK)
|
||||||
my $connect_response = <$vpopmaild_socket>;
|
my $connect_response = <$vpopmaild_socket>;
|
||||||
if (!$connect_response =~ /\+OK.*/) {
|
return DECLINED unless $connect_response eq '+OK \r\n';
|
||||||
return DECLINED;
|
|
||||||
}
|
|
||||||
|
|
||||||
# send login details
|
# send login details
|
||||||
print $vpopmaild_socket "login $user $passClear\n\r";
|
print $vpopmaild_socket "login $user $passClear\n\r";
|
||||||
@ -50,7 +48,7 @@ sub auth_vpopmaild {
|
|||||||
close($vpopmaild_socket);
|
close($vpopmaild_socket);
|
||||||
|
|
||||||
# check for successful login
|
# check for successful login
|
||||||
if ($login_response =~ /\+OK.*/) {
|
if ($login_response eq '+OK+\r\n') {
|
||||||
return (OK, 'authcheckpassword');
|
return (OK, 'authcheckpassword');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user