Skip to content
Permalink
Browse files

Add `.` to the list of allowed characters.

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 0dfce1abf34316f3be16e9e248860f84f94686e7
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/Cake/Network/Email/CakeEmail.php
  2. +3 −3 lib/Cake/Test/Case/Network/Email/CakeEmailTest.php
@@ -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.
@@ -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'
);
@@ -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',

0 comments on commit 0dfce1a

Please sign in to comment.
You can’t perform that action at this time.