summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2020-04-05 09:55:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2020-04-05 09:55:22 +0000
commit87b56c65217c3c6d742b5e3c764982620c863055 (patch)
tree3ed5e9eb0d52db2a9d89ff02b143753f2b91c3dc
parentdd71338ff1657b7429252d252effc5a32ed76c9a (diff)
downloadredmine-87b56c65217c3c6d742b5e3c764982620c863055.tar.gz
redmine-87b56c65217c3c6d742b5e3c764982620c863055.zip
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
-rw-r--r--app/models/email_address.rb2
1 files changed, 1 insertions, 1 deletions
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