Skip to content

Commit 014e970

Browse files
Fixed bug that allowed disabled user to authenticate successfully when using API token mode
1 parent 17535a2 commit 014e970

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pfSense-pkg-API/files/etc/inc/api/framework/APIAuth.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ class APIAuth {
8888

8989
if (APITools\authenticate_token($this->request["client-id"], $this->request["client-token"]) === true) {
9090
$this->username = pack("H*", $this->request["client-id"]);
91-
// Ensure user is not disabled
92-
if (APITools\is_user_disabled($this->request["client-id"]) === false) {
91+
# Ensure user is not disabled
92+
if (APITools\is_user_disabled($this->username) === false) {
9393
unset($_SESSION["Username"]);
9494
$_SESSION["Username"] = $this->username;
9595
return true;

0 commit comments

Comments
 (0)