mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Use exit instead of return here, otherwise script's return code is always 0 and user with wrong password is authenticated
This commit is contained in:
parent
34d0323759
commit
e2a319f3dd
@ -102,7 +102,7 @@ if (!$username || !$password) {
|
||||
return;
|
||||
} else {
|
||||
closelog();
|
||||
return (-1);
|
||||
exit (-1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ if (($strictusercn === true) && ($common_name != $username)) {
|
||||
return;
|
||||
} else {
|
||||
closelog();
|
||||
return (1);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,7 +148,7 @@ if ($authenticated == false) {
|
||||
return;
|
||||
} else {
|
||||
closelog();
|
||||
return (-1);
|
||||
exit (-1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,6 +161,6 @@ closelog();
|
||||
if (isset($_GET['username']))
|
||||
echo "OK";
|
||||
else
|
||||
return (0);
|
||||
exit (0);
|
||||
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user