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

Zod email validation fails for subdomains with hyphens #2867

Closed
pentaquarks opened this issue Oct 10, 2023 · 4 comments
Closed

Zod email validation fails for subdomains with hyphens #2867

pentaquarks opened this issue Oct 10, 2023 · 4 comments
Assignees
Labels

Comments

@pentaquarks
Copy link

Dear all,

I'm having trouble resetting my password. The "Forgot Password" button at the login page works, I get the email with a link to the site where I can choose a new password. However, when I try to login using this new password I get an error message (attachment). Other community members have the same problem.

Many thanks
Christoph
pubpub-login-failed

@gabestein
Copy link
Member

Hi Christoph -- I'm unable to replicate this issue. I just reset passwords on a few test accounts successfully. Can you let me know what browser you're using and, if possible, please go through the password reset flow again and, on the page where you type in the new password, before typing in the new password, open the network tab of the developer tools in your browser and send a screenshot of what you see there when you submit the new password? Since that screenshot could contain sensitive information, you can send it to hello@pubpub.org.

@pentaquarks
Copy link
Author

pentaquarks commented Oct 10, 2023

Thank you for the quick answer! I'm using Firefox and Chrome (each of them the current version). Did you received my email?

@gabestein
Copy link
Member

Adding from our conversation so devs can take a look: the issue is a known with with zod's email validation with hyphens. See: colinhacks/zod#2540

@gabestein gabestein changed the title Passwort reset not working Zod email validation fails for subdomains with hyphens Oct 10, 2023
gabestein pushed a commit that referenced this issue Oct 10, 2023
* fix: update zod to allow hyphens and subdomains in email, and add tests to prevent regression

* chore: fix eslint error
@tefkah
Copy link
Collaborator

tefkah commented Oct 31, 2023

This should have been solved by #2870

@tefkah tefkah closed this as completed Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants