Skip to content

Commit

Permalink
Add . to the list of allowed characters.
Browse files Browse the repository at this point in the history
This was missed when the email validation rules were relaxed in
dc34d80.

Fixes #4027
  • Loading branch information
markstory committed Jul 19, 2014
1 parent 52c8aa1 commit 0dfce1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Network/Email/CakeEmail.php
Expand Up @@ -320,7 +320,7 @@ class CakeEmail {
*
* @var string
*/
protected $_emailPattern = '/^((?:[\p{L}0-9!#$%&\'*+\/=?^_`{|}~-]+)*@[\p{L}0-9-.]+)$/ui';
protected $_emailPattern = '/^((?:[\p{L}0-9.!#$%&\'*+\/=?^_`{|}~-]+)*@[\p{L}0-9-.]+)$/ui';

/**
* The class name used for email configuration.
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
Expand Up @@ -251,15 +251,15 @@ public function testTo() {
$list = array(
'root@localhost' => 'root',
'bjørn@hammeröath.com' => 'Bjorn',
'cake@cakephp.org' => 'Cake PHP',
'cake.php@cakephp.org' => 'Cake PHP',
'cake-php@googlegroups.com' => 'Cake Groups',
'root@cakephp.org'
);
$this->CakeEmail->to($list);
$expected = array(
'root@localhost' => 'root',
'bjørn@hammeröath.com' => 'Bjorn',
'cake@cakephp.org' => 'Cake PHP',
'cake.php@cakephp.org' => 'Cake PHP',
'cake-php@googlegroups.com' => 'Cake Groups',
'root@cakephp.org' => 'root@cakephp.org'
);
Expand All @@ -271,7 +271,7 @@ public function testTo() {
$expected = array(
'root@localhost' => 'root',
'bjørn@hammeröath.com' => 'Bjorn',
'cake@cakephp.org' => 'Cake PHP',
'cake.php@cakephp.org' => 'Cake PHP',
'cake-php@googlegroups.com' => 'Cake Groups',
'root@cakephp.org' => 'root@cakephp.org',
'jrbasso@cakephp.org' => 'jrbasso@cakephp.org',
Expand Down

0 comments on commit 0dfce1a

Please sign in to comment.