Normalize_emails: can't change email address from user+x@gmail.com to user@gmail.com

If a user with address user+123@gmail.com tries change their address to user@gmail.com they get the verification link, but when they try to accept it, they get “email already taken”.

Seems like it should do something like

  • deny changing to the other address
  • accept the address without verification (it’s the same address)
  • replace the address before checking if it already exists
8개의 좋아요

This. If the user tries to change the email and the normalized email addresses are the same, it should simply change it without any further process.

4개의 좋아요

Happy to put a pr-welcome on a fix here for now.

This is dangerous if applied to any email provider, but if we limit it to gmail addresses this is fine.

3개의 좋아요

will be fixed per:

https://github.com/discourse/discourse/pull/37133

2개의 좋아요