Skip to content

Commit 1ca88e0

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: [DotEnv] Remove `usePutEnv` property default value Set up typo fix [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 resolving bindings for named TypedReference [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 4.3.10 updated VERSION for 4.3.9 updated CHANGELOG for 4.3.9 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 Add test on ServerLogHandler
2 parents 6b1774c + c6bcd90 commit 1ca88e0

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)