Describe the bug
A clear and concise description of what the bug is.
As I'm trying to modernize one of the pfsense integrations for home assistant, I've found a couple places where the rest API isn't returning correct data, relative to the existing XML api.
- Firewall rules - enabled - is represented as an empty xml element when disabled (e.g., . Which is returned as an empty string by the rest api.
- Firewall rules - statetype - also often represented as an empty xml element, and rest api may fail due to empty statetype during PATCH.
To Reproduce
- PATCH method to /firewall/rule endpoint with "" as statetype (rule must have default statetype; if "keepstate" seems to work properly with empty string) attempting to toggle enabled/disabled on rule.
Expected behavior
expected rule to toggle enabled/disabled
Screenshots or Response
no screenshots at this time
pfSense Version & Package Version:
- pfSense Version: pfSense 26.07
- Package Version v2.10.2
Affected Endpoints:
- URL: /api/v2/firewall/rule
Additional context
Add any other context about the problem here.
Describe the bug
A clear and concise description of what the bug is.
As I'm trying to modernize one of the pfsense integrations for home assistant, I've found a couple places where the rest API isn't returning correct data, relative to the existing XML api.
To Reproduce
Expected behavior
expected rule to toggle enabled/disabled
Screenshots or Response
no screenshots at this time
pfSense Version & Package Version:
Affected Endpoints:
Additional context
Add any other context about the problem here.