-
Notifications
You must be signed in to change notification settings - Fork 778
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
Replaces 'Whitelist' with 'Allowlist' #8305
base: master
Are you sure you want to change the base?
Conversation
@@ -60,7 +60,7 @@ public function updateBlocklistAction() | |||
|
|||
// strip off any trailing dot | |||
$value = rtrim($domain, '.'); | |||
$wl = explode(',', (string)$mdl->dnsbl->whitelists); | |||
$wl = explode(',', (string)$mdl->dnsbl->allowlists); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$wl could have been changed to $al too, I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is the thing I was afraid of: changing model field names forces data loss for everyone using the feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch.
<id>unbound.dnsbl.whitelists</id> | ||
<label>Whitelist Domains</label> | ||
<id>unbound.dnsbl.allowlists</id> | ||
<label>Allowlist Domains</label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start with the label only...
<type>select_multiple</type> | ||
<style>tokenize</style> | ||
<allownew>true</allownew> | ||
<help>List of domains to whitelist. You can use regular expressions.</help> | ||
<help>List of domains to allowlist. You can use regular expressions.</help> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and the help text.
@@ -37,7 +37,7 @@ class DefaultBlocklistHandler(BaseBlocklistHandler): | |||
def __init__(self): | |||
super().__init__('/usr/local/etc/unbound/unbound-blocklists.conf') | |||
self.priority = 100 | |||
self._whitelist_pattern = self._get_excludes() | |||
self._allowlist_pattern = self._get_excludes() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changes in this script are likely ok
@@ -85,9 +85,9 @@ custom_{{loop.index}}={{uri}} | |||
[exclude] | |||
# exclude localhost entries | |||
default_pattern_1=.*localhost$ | |||
{% if not helpers.empty('OPNsense.unboundplus.dnsbl.whitelists')%} | |||
{% if not helpers.empty('OPNsense.unboundplus.dnsbl.allowlists')%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
model changes again here and below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack, will remove.
@@ -75,7 +75,7 @@ public function totalsAction($maximum) | |||
} | |||
} | |||
|
|||
$parsed['whitelisted_domains'] = array_keys($nodes['dnsbl']['whitelists']); | |||
$parsed['allowlisted_domains'] = array_keys($nodes['dnsbl']['allowlists']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return key is ok access key is difficult, GUI changes are probably ok either way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack, I'll remove.
Built and tested on