-
Notifications
You must be signed in to change notification settings - Fork 45
Do not allow signup with email with *
#1882
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
Conversation
|
Shouldn't we make this more general than just not allowing Like for usernames, I think more characters should be disallowed. def clean_username(self):
data = self.cleaned_data["username"]
# Check if username has allowed characters only
# Allow only lowercase letters, numbers, hyphens, and underscores
if not re.match(r"^[a-z0-9_-]+$", data):
raise forms.ValidationError("Username can only contain lowercase letters, numbers, hyphens, and underscores.")
# Check username length
if (len(data) > 15) or (len(data) < 5):
raise forms.ValidationError(
"Username must have at least 5 characters and at most 15 characters"
)
return data
def clean_email(self):
email = self.cleaned_data["email"]
if "*" in email:
raise forms.ValidationError("Email address cannot contain the '*' character.")
return email |
|
I was not sure what other checks we want to put on email. Unlike usernames emails cannot be restricted too much because they can have different characters but we can still discuss and comeup with more checks |
|
I think it is fine this way. I don't even get how people tried to register with |
* consumer async and template static loading changes * flake problems * comp participant needs creating * ORM based issues recified. * flake message removal * CONCERN task * Add remove button for cancelled submissions (#1808) * Add remove button for cancelled submissions * Allow remove of cancelled submissions * more waits added * flake concerns * Update compute_worker.py * Triggering tests with blank line deletion * flake * circleci resource_class: medium+ * circleci resource_class: large * circleci resource_class: xlarge * Add permissions check for bulk download * flake8 fix * Add hide_score_output option (#1838) * Add hide_score_output option * Update test * Add the options for v1 bundles * Make more generic tests (v1, v2) * code removed that was copying submission files to predictions dir * hail mary * flake * config * version update workflow removed * Add hide_prediction_output feature * Calendar lock fixed, additional check added for start and end date * Simplify code * Version bump * Removed time and updated date to today * Caddy image update * fix Caddyfile indentation * django to 3.2.0 - but still has websocket errors for test_submissions during tests * poetry.lock * removing submissions to pass circleci * Do not allow signup with email with `*` (#1882) * fix to run result sbmission(with copy to predictions dir) * raise error when signing up with an email with * * revert compute worker changes * User model filters - remove `deleted` (#1887) * fix to run result sbmission(with copy to predictions dir) * removed filter based on * reverted compute worker changes * consumer async and template static loading changes * flake problems * comp participant needs creating * ORM based issues recified. * flake message removal * CONCERN task * more waits added * flake concerns * Triggering tests with blank line deletion * flake * circleci resource_class: medium+ * circleci resource_class: large * circleci resource_class: xlarge * hail mary * flake * config * django to 3.2.0 - but still has websocket errors for test_submissions during tests * poetry.lock * removing submissions to pass circleci * integrate dev branch commit: 2883349 * config.yml for circleci * config.yml for circleci * spelling mistake * timing issues * flake * timing issues * timing issues * timing issues * timing issues * logger.info -> logger.debug changes * test just selenium submissions * time adjustment * separating out submissions to see if one is particulary troublesome * time adjustment * time adjustment * docker images * submissions in batch * all * final clean up --------- Co-authored-by: Adrien Pavão <adrien.pavao@gmail.com> Co-authored-by: Ihsan Ullah <ihsan2131@gmail.com> Co-authored-by: Obada Haddad <obada.haddad@lisn.fr> Co-authored-by: Moritz <moritz.mueller2@tu-dresden.de>
@Didayolo
Description
Codabench was allowing users to use emails with
*e.g. ihsan*@gmail.com was considered a valid email. Now this will raise an error.Issues this PR resolves
*#1881A checklist for hand testing
*in itChecklist