Skip to content

Conversation

@ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Jun 18, 2025

@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.

Screenshot 2025-06-18 at 4 38 44 PM

Issues this PR resolves

A checklist for hand testing

  • try signing up with an email with * in it

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@ihsaan-ullah ihsaan-ullah linked an issue Jun 18, 2025 that may be closed by this pull request
@Didayolo Didayolo self-assigned this Jun 19, 2025
@Didayolo
Copy link
Member

@ihsaan-ullah

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

@ihsaan-ullah
Copy link
Collaborator Author

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

@Didayolo
Copy link
Member

I think it is fine this way. I don't even get how people tried to register with * in the first place.

@Didayolo Didayolo merged commit c2d57ad into develop Jun 20, 2025
1 check passed
@Didayolo Didayolo deleted the email_with_star branch June 20, 2025 12:59
Didayolo added a commit that referenced this pull request Jul 17, 2025
* 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>
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.

Do not allow emails with *

3 participants