Skip to content

Commit c6bcd90

Browse files
committed
Merge branch '3.4' into 4.3
* 3.4: [Validator] Allow underscore character "_" in URL username and password [SecurityBundle] Passwords are not encoded when algorithm set to \"true\" do not validate passwords when the hash is null [DI] Fix making the container path-independent when the app is in /app Allow copy instead of symlink for ./link script [FrameworkBundle] resolve service locators in `debug:*` commands bumped Symfony version to 3.4.37 updated VERSION for 3.4.36 update CONTRIBUTORS for 3.4.36 updated CHANGELOG for 3.4.36
2 parents 5394842 + 9042349 commit c6bcd90

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Constraints/UrlValidator.php

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

Tests/Constraints/UrlValidatorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ public function getValidUrls()
152152
['http://☎.com/'],
153153
['http://username:[email protected]'],
154154
['http://user.name:[email protected]'],
155+
['http://user_name:[email protected]'],
155156
['http://username:[email protected]'],
156157
['http://user.name:[email protected]'],
157158
['http://[email protected]'],
159+
['http://[email protected]'],
158160
['http://symfony.com?'],
159161
['http://symfony.com?query=1'],
160162
['http://symfony.com/?query=1'],

0 commit comments

Comments
 (0)