You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTTP 500 Error on GET /api/v2/firewall/aliases - Undefined constant #829
Steps to Reproduce
Update pfSense REST API package to latest version
Execute: curl -k -X GET -H "X-API-Key: [VALID_KEY]" "https://[PFSENSE_IP]/api/v2/firewall/aliases"
Receive HTTP 500 error
Expected Behavior
Should return a list of firewall aliases in JSON format (as it did in the previous version)
Actual Behavior
Returns HTTP 500 with "Undefined constant" error
Root Cause
Based on the stack trace, the error originates in:
File: /usr/local/pkg/RESTAPI/Core/BaseTraits.inc
Line: 56
Function: constant()
The function constant() is being called with an empty or undefined constant name, likely during the authentication/logging process.
Impact
Critical: Cannot list firewall aliases via API
Breaks existing automation scripts that worked with previous API version
No workaround available - endpoint is completely non-functional
Additional Information
This worked correctly in the previous version of the API package
Only the API package was updated, not pfSense itself
Other API endpoints may be affected by the same issue
The error occurs during authentication phase before reaching the actual endpoint logic
Request
Please fix the undefined constant issue in BaseTraits.inc line 56 and release a patch as soon as possible, as this breaks critical functionality for users relying on API automation.
I'm working on a patch for this and will have something out this morning. It does not seem to be applying default values for new API settings on some installs like expected.
In the meantime, you can fix the issue by manually going into the REST API settings within the UI and saving.
Activity
pieterjanhaan commentedon Jan 19, 2026
I got the same issue after the update
jaredhendrickson13 commentedon Jan 19, 2026
I'm working on a patch for this and will have something out this morning. It does not seem to be applying default values for new API settings on some installs like expected.
In the meantime, you can fix the issue by manually going into the REST API settings within the UI and saving.