Firewall: Allow any zone as valid input for is_zone function - #85
Merged
Conversation
stephdl
force-pushed
the
sdl-fix_inactive_zone
branch
from
January 10, 2025 11:01
758ea41 to
6e935e2
Compare
gsanchietti
requested changes
Jan 10, 2025
Comment on lines
+1194
to
+1196
| # True zone if name is 'any' zone name -> '*' | ||
| elif name == '*': | ||
| return True |
Member
There was a problem hiding this comment.
This should not be inside the loop. It's enough to check it once at beginning of the function.
Member
There was a problem hiding this comment.
Please also add the tests for this function.
Contributor
Author
There was a problem hiding this comment.
tests done, we wheck is active_zone is set in the rule list and we check some fex example of ulr True or False
gsanchietti
approved these changes
Jan 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the
is_zonefunction to recognize '*' as a valid zone name, enhancing its flexibility in zone validation.NethServer/nethsecurity#1012