Skip to content

Commit

Permalink
Check for the exact string resonses from vpopmaild rather than using …
Browse files Browse the repository at this point in the history
…regexes
  • Loading branch information
Robin Bowes authored and rspier committed May 13, 2010
1 parent e139521 commit 0d2b724
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugins/auth/auth_vpopmaild
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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 {
Expand Down

0 comments on commit 0d2b724

Please sign in to comment.