Feature #29208

IDN support for email addresses of user accounts

Added by Go MAEDA 3 months ago. Updated 7 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Accounts / authentication
Target version:4.1.0
Resolution:

Description

This is a patch to add IDN (internationalized domain names) support to email addresses of user accounts.

Currently, Redmine does not accept IDN email addresses like "joe@ドメイン名例.jp" and its ASCII expression "" when creating/updating a user account. After applying this patch, both expressions will be accepted.

According to IDN World Report, there are approx 8.7 millions IDNs in the world as of December 2016, and those are used in many countries. To support IDN email addresses should be beneficial for many people.

This patch converts Unicode domain names to traditional ASCII domain names just before saving an email address. However, it does not convert ASCII domain names to Unicode domain names when displaying email address. Users will see ASCII expression "" on my_account page even if they have entered Unicode email address "joe@ドメイン名例.jp".

This approach can minimize the change to existing code and works fine with IDN-unaware MTAs and plugins while allowing people to use IDN email addresses.

"Email" field accepts Unicode domain names:

ASCII converted email address is shown after saving:

References:

idn-support-screenshot-1.png (25.9 KB) Go MAEDA, 2018-07-07 08:57

idn-support-screenshot-2.png (30.5 KB) Go MAEDA, 2018-07-07 08:57

support-idn-email-addresses.diff Magnifier (2.21 KB) Go MAEDA, 2018-07-07 08:58

support-idn-email-addresses-v2.diff Magnifier (2.23 KB) Go MAEDA, 2018-07-07 09:27

support-idn-email-addresses-v3.diff Magnifier (1.97 KB) Go MAEDA, 2018-07-07 09:59

support-idn-email-addresses-v4.diff Magnifier (2.13 KB) Go MAEDA, 2018-07-08 07:40

0002-Support-IDN-email-addresses.patch Magnifier (1.95 KB) Go MAEDA, 2018-09-15 10:56

0001-Allow-Punycode-in-email-addresses.patch Magnifier (1.11 KB) Go MAEDA, 2018-09-16 03:16


Related issues

Related to Redmine - Defect #28878: Email does not support Russian-language domains. New
Related to Redmine - Defect #15985: Email address with non-ASCII character causes delivery error New

History

#1 Updated by Go MAEDA 3 months ago

  • Related to Defect #28878: Email does not support Russian-language domains. added

#2 Updated by Go MAEDA 3 months ago

  • Related to Defect #15985: Email address with non-ASCII character causes delivery error added

#3 Updated by Go MAEDA 3 months ago

Fixed unnecessary Punycode conversion when an invalid email address is entered.

#4 Updated by Go MAEDA 3 months ago

Removed unnecessary "require 'simpleidn'".

#5 Updated by Go MAEDA 3 months ago

Updated the patch.

  • Simplified the code by replacing String#rpartition with String#partition.
  • Added tests to make sure that local-part is not encoded with Punycode.

#6 Updated by Go MAEDA 3 months ago

  • Target version set to 4.1.0

As we can see in #28878, there are already people who are in trouble because of lack of internationalized domain name support. I think that more and more people will start using email addresses with IDN. Let's deliver this feature in the next major release.

#7 Updated by Go MAEDA 7 days ago

I divided support-idn-email-addresses-v4.diff into two patches. The first one changes only the regular expression to allow Punycode in email addresses. The second one supports email addresses which include Unicode characters in the domain names.

I think that Redmine should support Punycode at least. If 0001-Allow-Punycode-in-email-addresses.patch is merged, a user who has uses an email address "joe@ドメイン名例.jp" can make his account on Redmine by spelling his email address as "".

#8 Updated by Go MAEDA 7 days ago

  • File deleted (0001-Allow-Punycode-in-email-addresses.patch)

#9 Updated by Go MAEDA 7 days ago

Improved the regular expression for email addresses.

Also available in: Atom PDF