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

Not able to register EPerson account for email address with TLD of more than 4 characters #2586

Open
bram-atmire opened this issue Oct 27, 2023 · 2 comments · May be fixed by #2958
Open

Not able to register EPerson account for email address with TLD of more than 4 characters #2586

bram-atmire opened this issue Oct 27, 2023 · 2 comments · May be fixed by #2958
Labels
authentication: general general authentication issues authentication: password related to built in password authentication bug good first issue This is a smaller ticket/bug that may be easier for new contributors help wanted Needs a volunteer to claim to move forward

Comments

@bram-atmire
Copy link
Member

bram-atmire commented Oct 27, 2023

Describe the bug
Most TLDs are usually very short (.com, .edu, ...)
But there are realy TLDs and real usecases where the TLD is longer. The largest one is currently 24 characters long cfr
https://stackoverflow.com/a/22038535/3101995

To Reproduce

  1. Try to register an eperson for an email address where the last part after the period, the TLD, is longer than 4 characters

Observed behavior
Angular blocks creation of this account

Expected behavior
I should be able to register an account

The fix
Change 4 to 24 at the very end of the pattern here:
https://github.com/DSpace/dspace-angular/blob/main/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts#L255

Workaround
If you are confronted with this problem and urgently need EPeople created with TLD email addresses + 4 characters, know that this validation is NOT applied when you create EPeople through the REST command line using:

[dspace]/bin/dspace create-administrator

Obviously, this command creates an administrator account. If you don't want the account to be an administrator, make sure you subsequently remove the person from the admin group in the user interface!!!

Related work
Link to any related tickets or PRs here.

@bram-atmire bram-atmire added bug needs triage New issue needs triage and/or scheduling labels Oct 27, 2023
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Oct 27, 2023
@tdonohue tdonohue added authentication: general general authentication issues authentication: password related to built in password authentication help wanted Needs a volunteer to claim to move forward good first issue This is a smaller ticket/bug that may be easier for new contributors and removed needs triage New issue needs triage and/or scheduling labels Oct 27, 2023
@nwoodward
Copy link
Contributor

nwoodward commented Nov 2, 2023

There are two other places where the email validation could be changed to accommodate 24 characters:

But then I noticed that the new user registration page uses a completely different regex for email validation:

Which one is preferred?

@tdonohue
Copy link
Member

Fixed by #2958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authentication: general general authentication issues authentication: password related to built in password authentication bug good first issue This is a smaller ticket/bug that may be easier for new contributors help wanted Needs a volunteer to claim to move forward
Projects
Development

Successfully merging a pull request may close this issue.

3 participants