mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
Merge branch 'develop-olympus' into develop
By Andreas Fischer via Andreas Fischer (1) and Nils Adermann (1) * develop-olympus: [ticket/10162] Increase maximum length of email address TLD from 6 to 63. [ticket/10162] Add test cases for top level domain names longer than 6 chars.
This commit is contained in:
commit
4a5004781a
2 changed files with 4 additions and 1 deletions
|
@ -3250,7 +3250,7 @@ function get_preg_expression($mode)
|
||||||
case 'email':
|
case 'email':
|
||||||
// Regex written by James Watts and Francisco Jose Martin Moreno
|
// Regex written by James Watts and Francisco Jose Martin Moreno
|
||||||
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
|
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
|
||||||
return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'bbcode_htm':
|
case 'bbcode_htm':
|
||||||
|
|
|
@ -28,6 +28,8 @@ class phpbb_regex_email_test extends phpbb_test_case
|
||||||
array('alice_foo@bar.phpbb.com'),
|
array('alice_foo@bar.phpbb.com'),
|
||||||
array('alice+tag@foo.phpbb.com'),
|
array('alice+tag@foo.phpbb.com'),
|
||||||
array('alice&tag@foo.phpbb.com'),
|
array('alice&tag@foo.phpbb.com'),
|
||||||
|
array('alice@phpbb.australia'),
|
||||||
|
array('alice@phpbb.topZlevelZdomainZnamesZcanZbeZupZtoZsixtyZthreeZcharactersZlong'),
|
||||||
|
|
||||||
//array('"John Doe"@example.com'),
|
//array('"John Doe"@example.com'),
|
||||||
//array('Alice@[192.168.2.1]'), // IPv4
|
//array('Alice@[192.168.2.1]'), // IPv4
|
||||||
|
@ -96,6 +98,7 @@ class phpbb_regex_email_test extends phpbb_test_case
|
||||||
array('! "#$%(),/;<>[]`|@invalidCharsInLocal.org'),
|
array('! "#$%(),/;<>[]`|@invalidCharsInLocal.org'),
|
||||||
array('invalidCharsInDomain@! "#$%(),/;<>_[]`|.org'),
|
array('invalidCharsInDomain@! "#$%(),/;<>_[]`|.org'),
|
||||||
array('local@SecondLevelDomainNamesAreInvalidIfTheyAreLongerThan64Charactersss.org'),
|
array('local@SecondLevelDomainNamesAreInvalidIfTheyAreLongerThan64Charactersss.org'),
|
||||||
|
array('alice@phpbb.topZlevelZdomainZnamesZcanZbeZupZtoZsixtyZthreeZcharactersZlongZ'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue