From 87b56c65217c3c6d742b5e3c764982620c863055 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 5 Apr 2020 09:55:22 +0000 Subject: [PATCH] Email address with Punycode top-level domain is not accepted (#32793). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@19660 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/email_address.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/email_address.rb b/app/models/email_address.rb index 4cd9c5dfd..b27cf6e58 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 -- 2.39.5