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

Missing form error for duplicate email address #1956

Closed
janno42 opened this issue Jun 12, 2023 · 0 comments · Fixed by #1979
Closed

Missing form error for duplicate email address #1956

janno42 opened this issue Jun 12, 2023 · 0 comments · Fixed by #1979
Labels
[C] Backend Focuses on backend implementation [P] Major Major priority [S] Very small This issue should require only very small changes. [T] Bug This is a bug. We don't like it. Please get rid of it.

Comments

@janno42
Copy link
Member

janno42 commented Jun 12, 2023

When changing a user's email address to an address that does not yet exist, but results in an existing address after applying the replacements in evaluation.tools.clean_email, an internal server error is thrown.

staff.forms.clean_email should call evaluation.tools.clean_email to prevent this.

Test case:

  • replace the INSTITUTION_EMAIL_REPLACEMENTS definition in the settings to INSTITUTION_EMAIL_REPLACEMENTS: List[Tuple[str, str]] = [("institution.example.com", "institution.com")]
  • change Oma Abner's email address to oma.abner@institution.com
  • change any other user's email address to oma.abner@institution.example.com
@janno42 janno42 added [T] Bug This is a bug. We don't like it. Please get rid of it. [P] Major Major priority [S] Very small This issue should require only very small changes. [C] Backend Focuses on backend implementation labels Jun 12, 2023
florian-str added a commit to florian-str/EvaP that referenced this issue Jul 10, 2023
janno42 pushed a commit that referenced this issue Jul 17, 2023
* Fixed duplicate through email cleaning #1956

* Fixed style issues

* Refactored clean_email usage

* Fixed failing test due to changed error message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C] Backend Focuses on backend implementation [P] Major Major priority [S] Very small This issue should require only very small changes. [T] Bug This is a bug. We don't like it. Please get rid of it.
Development

Successfully merging a pull request may close this issue.

1 participant