-
-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Describe the bug
When replacing all firewall aliases using PUT /api/v2/firewall/aliases, nested aliases are not being allowed even when the referenced alias was validated and set in the config earlier in the call.
To Reproduce
Run curl -s -k -u admin:pfsense -X PUT https://localhost/api/v2/firewall/aliases -H "content-type: application/json" -d '[{"name": "test_alias_1", "type": "host", "address": []}, {"name": "test_alias_2", "type": "host", "address": ["test_alias_1"]}]'
Expected behavior
Nested aliases should be allowed.
Screenshots or Response
If applicable, add screenshots or response data to help explain your problem.
pfSense Version & Package Version:
- pfSense Version: CE 2.7.2
- Package Version v2.2.2
Affected Endpoints:
- PUT /api/v2/firewall/aliases
Additional context
This seems to be caused by the pfSense is_ipaddroralias and is_port_or_range_or_alias functions not fetching changes to the configuration between each validation. We should either force a config reload between objects or use a different method to determine if a nested alias is being used.