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

Support wildcards in email domain whitelisting #20255

Closed
KingBain opened this issue Jul 5, 2022 · 0 comments · Fixed by #24831
Closed

Support wildcards in email domain whitelisting #20255

KingBain opened this issue Jul 5, 2022 · 0 comments · Fixed by #24831
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@KingBain
Copy link

KingBain commented Jul 5, 2022

Feature Description

Was working on setting up a semi-private gitea site that limited registration to just the main Government of Canada(GC) email domains. There are primarily two email TL domains associated with the GC, *.gc.ca and canada.ca.

A full list of .gc domains can be seen here.

When I tried to use a wildcard address in EMAIL_DOMAIN_WHITELIST I noticed that the * wildcard was not supported.

So I am requesting wildcard support in EMAIL_DOMAIN_WHITELIST. I have done some experimenting to see if and how this could be done.

https://go.dev/play/p/A7bV1R2g9jh

Unfortunatley I'm not a strong golan coder, so my pullrequest will probably not pass your QC and testing

Screenshots

No response

@KingBain KingBain added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jul 5, 2022
silverwind pushed a commit that referenced this issue May 22, 2023
Replace #20257 (which is stale and incomplete)

Close #20255

Major changes:

* Deprecate the "WHITELIST", use "ALLOWLIST"
* Add wildcard support for EMAIL_DOMAIN_ALLOWLIST/EMAIL_DOMAIN_BLOCKLIST
* Update example config file and document
* Improve tests
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
1 participant