Defect #36969

Updated by Mischa The Evil 2 months ago

There is a regex in the @EmailAddress@ EmailAddress class, that matches matchs some invalid email address like these: these:<pre>
<pre>
test,email@example.com
,test@example.com
$test@example.com
</pre>

<pre><code &lt;pre class="ruby">
class EmailAddress < ActiveRecord::Base
include Redmine::SafeAttributes

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

&lt;/pre&gt;


</code></pre>

May be better to use @URI::MailTo::EMAIL_REGEXP@ URI::MailTo::EMAIL_REGEXP instead.

Back