Skip to content

Commit b0507f0

Browse files
fix: fixed broken priv handling in plus 24.11
1 parent 7c59347 commit b0507f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ class APIAuth {
129129
public function authorize() {
130130
# Local variables
131131
$authorized = false;
132-
$client_config =& getUserEntry($this->username);;
132+
133+
# Starting with pfSense Plus 24.11, the client config is nested under an 'item' key. Handle both cases.
134+
$client_config =& getUserEntry($this->username);
135+
$client_config = (array_key_exists('item', $client_config)) ? $client_config['item'] : $client_config;
133136
$this->privs = get_user_privileges($client_config);
134137

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

0 commit comments

Comments
 (0)