Skip to content

Commit

Permalink
fix: fixed broken priv handling in plus 24.11
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhendrickson13 committed Dec 8, 2024
1 parent 7c59347 commit b0507f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pfSense-pkg-API/files/etc/inc/api/framework/APIAuth.inc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ class APIAuth {
public function authorize() {
# Local variables
$authorized = false;
$client_config =& getUserEntry($this->username);;

# Starting with pfSense Plus 24.11, the client config is nested under an 'item' key. Handle both cases.
$client_config =& getUserEntry($this->username);
$client_config = (array_key_exists('item', $client_config)) ? $client_config['item'] : $client_config;
$this->privs = get_user_privileges($client_config);

# If no require privileges were given, assume call is always authorized
Expand Down

0 comments on commit b0507f0

Please sign in to comment.