-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Support wildcards in email domain whitelisting #20257
Conversation
removed extra line
It's going into the right direction. However the best thing you can do here is to only run the compile code once and then store the result. So please change the code in |
Hey, @Gusted thanks for the help. I made the changes.
Thanks in advance. |
Correction figured out how to call BuildEmailGlobs from setting package in user_form test |
I dont want to jinx the process, but if you're happy with the PR. Could we also include a change to rename 'setting.Service.EmailDomainWhitelist' to 'setting.Service.EmailDomainAllowlist' . I understand why folks stopped using Blacklist, but for symmetry probably worth changing 'Whitelist' to reflect the opposite of 'Blocklist' used in EmailDomainBlocklist . |
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.
Code looks good, might want to add documentation in config-cheat-sheet that EMAIL_DOMAIN_WHITELIST
and EMAIL_DOMAIN_BLOCKLIST
will be compiled to globs, with a link to https://pkg.go.dev/github.com/gobwas/glob#Compile which list the "syntax".
Is this PR still in progress? Long time since last review suggestion. At least, the app.example.ini and cheatsheet.md should be updated with "it supports wildcard" |
Replaced by Support wildcard in email domain allow/block list #24831, since this PR is stale and incomplete. |
Fixes #20255