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

Trailing underscore in mailbox returns empty error #41

Closed
yanismydj opened this issue Apr 16, 2019 · 3 comments
Closed

Trailing underscore in mailbox returns empty error #41

yanismydj opened this issue Apr 16, 2019 · 3 comments

Comments

@yanismydj
Copy link

I had a user reporting that they could not reset their password in Devise. Their email has a mailbox with a trailing underscore (exampleemail_@gmail.com), but the email_address gem is returning .valid? as false, and .error as empty string. This is different from #35 as the issue is not that we are incorrectly marking the email as invalid, but rather that we are simply returning a nil/empty error message which makes it difficult to give feedback to the user.

@afair
Copy link
Owner

afair commented Apr 17, 2019

Try unreleased master branch for your temp fix...

TRY #14 Fix... untested for now

Hi, I'm away and can't run the test on my current environment.
I made the change that should allow trailing underscore.

Good luck!

It's just a REGEX change, so you can look at this commit and try alternatives.

afair added a commit that referenced this issue May 2, 2019
Issues #41 and #35 reported this problem. It will also allow
multiple trailing underscores, but I am seeing this more in social
media account names
@afair
Copy link
Owner

afair commented May 2, 2019

I apologize, but what I did on my travels never seemed to make it to the server. I'm home now, jet lagged, and just tested and pushed a fix for this. You can try to use this from your Gemfile pointing to the head of the master branch instead of the gem name. I'll try to release this once I do more tests.

@olleolleolle
Copy link

@yanismydj Does this fix your original issue?

@afair afair closed this as completed Nov 21, 2019
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

No branches or pull requests

3 participants