Skip to content

Implement checking for nested alias content & Clean-up validators#141

Merged
superstes merged 19 commits intoO-X-L:latestfrom
scsitteam:nested_aliases
May 7, 2025
Merged

Implement checking for nested alias content & Clean-up validators#141
superstes merged 19 commits intoO-X-L:latestfrom
scsitteam:nested_aliases

Conversation

@jiuka
Copy link
Collaborator

@jiuka jiuka commented Jan 14, 2025

Link to API

https://docs.opnsense.org/development/api/core/firewall.html

Description

Content validation was disabled for host and network aliases to allow using nested values. This patch uses the already fetched list of aliases to validate nested entries for post, host and network.

Further the host validation has been improved and some tests added.

@ansibleguy
Copy link
Member

I hope I find time this weekend to review this. Sorry for the long delay..

@ansibleguy ansibleguy added the enhancement New feature or request label Mar 12, 2025
@superstes
Copy link
Member

@jiuka As I've recognized that we have duplicated validator-functions - I've migrated those to be inside the same validators.py file.

We still have some duplicate logic in the port-checks. Maybe you could give it a look?

@superstes
Copy link
Member

The port-validation is also an issue in #183

@superstes superstes self-requested a review April 14, 2025 21:14
@superstes superstes changed the title Implement checking for nested alias content Implement checking for nested alias content & Clean-up validators Apr 14, 2025
jiuka added 3 commits May 1, 2025 13:09
@superstes
Copy link
Member

superstes commented May 4, 2025

The tests (except openvpn) did pass.
@jiuka Could you review the changes?
If there are no issues left I would like to merge this soon

Copy link
Collaborator Author

@jiuka jiuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small things. 👍

@superstes
Copy link
Member

Thank you for catching those 👍

@superstes superstes merged commit eccf6f6 into O-X-L:latest May 7, 2025
2 checks passed
@jiuka jiuka deleted the nested_aliases branch May 14, 2025 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants