电子邮件地址中+之后的文本在唯一性检查中被忽略

Steps to reproduce

  1. Create a new account on https://community.drownedinsound.com.
  2. Use a GMail email with a + character in the username, e.g. jobloggs+discourse@gmail.com
  3. Log out.
  4. Create another account using a GMail email with different text after the + sign, e.g. jobloggs+discobot@gmail.com

Expected Results
Your email receives a new user signup request.

Actual Results
You receive an email to jobloggs+discourse@gmail.com saying that this “Account already exists”.

Notes
After signing up, the new email isn’t used to notify that the account always exists. Discourse didn’t used to behave this way, for example, before January 6th, this never happened on this site. There has been at least one site upgrade since then, and since that happened, this bug has been introduced.

1 个赞

This might be related to the HTTP/500 error we get on our Discourse when using + signs in email addresses depending on the status of the normalize_emails setting:

2 个赞

Thanks for this, you’re right, it was the normalize_emails setting being changed during the upgrade, and there being a bug when normalize_emails is set and you already have email accounts using + signs.

1 个赞

I think this setting is also the cause of the 500 fatal error our users are getting when trying to change their email address to one with a + sign in it.

Perhaps it should not be enabled if such accounts already exist.