プロジェクト

全般

プロフィール

Vote #80595

完了

Email address with Punycode top-level domain is not accepted

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Accounts / authentication_7
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
7
version_id:
160
issue_org_id:
32793
author_id:
332
assigned_to_id:
1
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Redmine does not accept email addresses that have Punycode top-level domain such as "jsmith@example.xn--80akhbyknj4f" (example.ИСПЫТАНИЕ). There are already over 150 TLDs that begin with "xn--" in the real world (see https://www.icann.org/resources/pages/tlds-2012-02-25-en), so Redmine should accept those domains.

The attached relaxes the validation rule for an email address to accept top-level domains which begin with "xn--".


journals

The issue can be fixed if the regular expression is changed as follows:

<pre><code class="diff">
diff --git a/app/models/email_address.rb b/app/models/email_address.rb
index 46bca384a..dd0b30607 100644
--- a/app/models/email_address.rb
+++ b/app/models/email_address.rb
@@ -20,7 +20,7 @@
class EmailAddress < ActiveRecord::Base
include Redmine::SafeAttributes

- EMAIL_REGEXP = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
+ EMAIL_REGEXP = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+(?:(?:xn--[-a-z0-9]+)|(?:[a-z]{2,})))\z/i

belongs_to :user

</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Setting the target version to 4.1.1.
--------------------------------------------------------------------------------
Committed and test added, thanks.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

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


related_issues

relates,New,29208,IDN support for email addresses of user accounts
relates,New,6088,eMail in uncommon formats considered invalid

Admin Redmine さんが約4年前に更新

  • カテゴリAccounts / authentication_7 にセット
  • 対象バージョン4.1.1_160 にセット

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

いいね!0
いいね!0