View Issue Details

IDProjectCategoryView StatusLast Update
0017275mantisbtemailpublic2015-09-06 17:37
Reportergrangeway Assigned Todregad  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version1.3.0-beta.3Fixed in Version1.3.0-beta.3 
Summary0017275: email matching within Mantis should follow html5 standard
Description

Mantis makes currently makes use of a custom regex for email handling within string api. This was implemented before HTML5 defined an email pattern for use within browsers.

We should replace our custom regex with the regular expression defined in HTML5 - this means that in future, the handling of email addreses within mantis should match the handling of email addresses within the web browser.

TagsNo tags attached.

Relationships

related to 0016894 closeddregad Don't allow invalid email addresses (e.g. fred@localhost) to be used when signing up 
related to 0017279 closeddregad Email addresses validation and parsing is not consistent 

Activities

dregad

dregad

2015-02-03 18:48

developer   ~0048784

I think it would be best if PHPMailer provided a way to retrieve the validation regexes (they are currently hardcoded within the validateAddress() method), which would allow us to match emails in a consistent manner with how they are validated.

Related Changesets

MantisBT: master 3b584404

2014-06-03 07:54

dregad


Details Diff
Add HTML5 email validation method (as default)

As per grangeway's suggestion in pull request 172, we are now using an
HTML5 specification-compliant regex to validate e-mail addresses by
default instead of PHP method.

Issue 0017275, 0017279
Affected Issues
0017275, 0017279
mod - config_defaults_inc.php Diff File
mod - core/constant_inc.php Diff File
mod - core/email_api.php Diff File
mod - docbook/Admin_Guide/en-US/config/email.xml Diff File

MantisBT: master bb5da6b6

2015-04-04 08:17

dregad


Details Diff
Use standard HTML5 regex in email_regex_simple()

A future improvement for this would be to retrieve the regex from the
PHPMailer library to ensure we are guaranteed consistent behavior for
our handling of e-mails, but this is currently not possible since the
regexes are hardcoded in PHPMailer's validateAddress() method.

Fixes 0017275, 0017279
Affected Issues
0017275, 0017279
mod - core/email_api.php Diff File