Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing restored rules #297

Closed
wants to merge 1 commit into from
Closed

Conversation

mcao2
Copy link

@mcao2 mcao2 commented Jul 3, 2023

Before this fix, when restoring a full backup where there's no hostName in the rules, the restore will silently fail since it is deemed as an invalid rule. However, it is totally legit to have a hostName that is an empty string "".

This PR fixes the above issue so that we can import rules where hostName field is an empty string.

@salarcode
Copy link
Owner

Rule`s "Rule Source Domain" which is the "hostName" filed is mandatory and should not be empty.
When you think this is going to be empty? What is the use case?

@mcao2
Copy link
Author

mcao2 commented Jul 4, 2023

I have the following rule to match all sites with prefix "192.168.88" i.e. sites within my LAN. Maybe I use it wrong?

CleanShot 2023-07-03 at 17 50 05

@salarcode
Copy link
Owner

salarcode commented Jul 4, 2023

Seems like a UI bug that field shows as required but allows empty source domain. I will need check this...

@salarcode salarcode force-pushed the master branch 6 times, most recently from ee4368c to 70c83cc Compare July 9, 2023 13:13
@salarcode salarcode closed this in b33cdf8 Jul 13, 2023
@salarcode
Copy link
Owner

I have pushed a correct validation method that should fix this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants