Posted by sean_fremouw on October 6, 2011 at 9:41pm
3 followers
| Project: | Mime Mail |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
The plus symbol ("+") is an allowed character in email usernames. There may be others not in the regex. Oh, yeah, underscores. I think the preg_match line should at least be:
preg_match('/[a-z0-9\-\.\+_]+@{1}[a-z0-9\-\.]+/i', $from, $matches);One could make the argument for a more inclusive expressions like:
preg_match('/[^\s<]+@{1}[^\s\.]+\.[^\s>]+/i', $from, $matches);But I'm not an expert and it may include more than it really should.
Comments
#1
The attached patch has been committed to both branches.
#2
Automatically closed -- issue fixed for 2 weeks with no activity.