Actions
Defect #36969
closedEmailAddress regex matches invalid email addresses
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
There is a regex in the EmailAddress
class, that matches some invalid email address like these:
test,email@example.com ,test@example.com $test@example.com
class EmailAddress < ActiveRecord::Base
include Redmine::SafeAttributes
EMAIL_REGEXP = /\A([^@\s]+)@((?:[-a-z0-9]+\.)+(?:(?:xn--[-a-z0-9]+)|(?:[a-z]{2,})))\z/i
May be better to use URI::MailTo::EMAIL_REGEXP
instead.
Files
Related issues
Actions