プロジェクト

全般

プロフィール

Vote #79420

未完了

IDN support for email addresses of user accounts

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Accounts / authentication_7
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
7
version_id:
32
issue_org_id:
29208
author_id:
332
assigned_to_id:
0
comments:
11
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

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 "joe@xn--eckwd4c7cu47r2wf.jp" 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":https://idnworldreport.eu/year-2017/facts-and-figures/idn-growth/ IDNs in the world as of December 2016, and those "are used in many countries":https://idnworldreport.eu/maps/idn-world-map/. 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 "joe@xn--eckwd4c7cu47r2wf.jp" 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:
!{border: 1px solid #ccc;}.idn-support-screenshot-1.png!

ASCII converted email address is shown after saving:
!{border: 1px solid #ccc;}.idn-support-screenshot-2.png!

References:


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Fixed unnecessary Punycode conversion when an invalid email address is entered.
--------------------------------------------------------------------------------
Removed unnecessary "@require 'simpleidn'@".
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
I divided attachment: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 attachment: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 "joe@xn--eckwd4c7cu47r2wf.jp".
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Improved the regular expression for email addresses.
--------------------------------------------------------------------------------
It seems that no one is interested in this feature. Maybe this feature does not worth adding a gem for now.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,New,28878,Email does not support Russian-language domains.
relates,New,15985,Email address with non-ASCII character causes delivery error
relates,Closed,32793,Email address with Punycode top-level domain is not accepted

Admin Redmine さんがほぼ2年前に更新

  • カテゴリAccounts / authentication_7 にセット
  • 対象バージョンCandidate for next major release_32 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0