Skip to content

Commit 067def5

Browse files
Merge branch '3.4'
* 3.4: (26 commits) [Routing] Fix resource miss [Security] Fixed auth provider authenticate() cannot return void [FrameworkBundle][Serializer] Move DateIntervalNormalizer definition to xml declare argument type Improving annotation loader message [FrameworkBundle][Serializer] Move normalizer/encoders definitions to xml file & remove unnecessary checks Update UPGRADE-4.0.md streamed response should return $this $isClientIpsVali is not used [WebServerBundle] Prevent commands from being registered by convention content can be a resource Adding the Form default theme files to be warmed up in Twig's cache Remove BC Break label from `NullDumper` class Username and password in basic auth are allowed to contain '.' Remove obsolete PHPDoc from UriSigner [Serializer] YamlEncoder: throw if the Yaml component isn't installed [Serializer] ObjectNormalizer: throw if PropertyAccess isn't installed [PropertyInfo] Add support for the iterable type pdo session fix Fixed pathinfo calculation for requests starting with a question mark. - fix bad conflict resolving issue - port symfony/symfony#21968 to 3.3+ ...
2 parents 3236d79 + d53485c commit 067def5

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
@@ -116,6 +116,9 @@ public function getValidUrls()
116116
array('http://xn--d1abbgf6aiiy.xn--p1ai/'),
117117
array('http://☎.com/'),
118118
array('http://username:[email protected]'),
119+
array('http://user.name:[email protected]'),
120+
array('http://username:[email protected]'),
121+
array('http://user.name:[email protected]'),
119122
array('http://[email protected]'),
120123
array('http://symfony.com?'),
121124
array('http://symfony.com?query=1'),

0 commit comments

Comments
 (0)