Skip to content

Commit 115047b

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Username and password in basic auth are allowed to contain '.' Remove obsolete PHPDoc from UriSigner [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed pdo session fix Fixed unsetting from loosely equal keys OrderedHashMap [Debug] Fix same vendor detection in class loader Updated the source text and translation reject remember-me token if user check fails
2 parents a3c0a45 + 5c8366b commit 115047b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Constraints/UrlValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class UrlValidator extends ConstraintValidator
2323
{
2424
const PATTERN = '~^
2525
(%s):// # protocol
26-
(([\pL\pN-]+:)?([\pL\pN-]+)@)? # basic auth
26+
(([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
2727
(
2828
([\pL\pN\pS-\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
2929
| # or

Tests/Constraints/UrlValidatorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ public function getValidUrls()
121121
array('http://xn--d1abbgf6aiiy.xn--p1ai/'),
122122
array('http://☎.com/'),
123123
array('http://username:password@symfony.com'),
124+
array('http://user.name:password@symfony.com'),
125+
array('http://username:pass.word@symfony.com'),
126+
array('http://user.name:pass.word@symfony.com'),
124127
array('http://user-name@symfony.com'),
125128
array('http://symfony.com?'),
126129
array('http://symfony.com?query=1'),

0 commit comments

Comments
 (0)