Skip to content

Commit bf8b28b

Browse files
Merge branch '5.3' into 5.4
* 5.3: Fix skip condition for INTL [Messenger] Fix `ErrorDetailsStamp` denormalization [Translation] Extract translatable content on twig set Simplify code Fix composer.json versions Fix composer.json versions Remove redundant license info [HttpFoundation] Fix isNotModified determination logic Fix Url Validator false positives [Translation] Reverse fallback locales [FrameworkBundle] Fall back to default configuration in debug:config and consistently resolve parameter values notifier smsapi - fixed checking whether message is sent allow null for framework.translator.default_path improve failure messages of the CrawlerSelectorTextContains constraint
2 parents 7c34cd9 + 916a7c6 commit bf8b28b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Constraints/UrlValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class UrlValidator extends ConstraintValidator
2525
(%s):// # protocol
2626
(((?:[\_\.\pL\pN-]|%%[0-9A-Fa-f]{2})+:)?((?:[\_\.\pL\pN-]|%%[0-9A-Fa-f]{2})+)@)? # basic auth
2727
(
28-
([\pL\pN\pS\-\_\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
28+
([\pL\pN\pS]+\.?[\pL\pN\pS\-\_]+)+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
2929
| # or
3030
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} # an IP address
3131
| # or

Tests/Constraints/UrlValidatorTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public function getValidUrls()
100100
return [
101101
['http://a.pl'],
102102
['http://www.example.com'],
103+
['http://tt.example.com'],
103104
['http://www.example.com.'],
104105
['http://www.example.museum'],
105106
['https://example.com/'],
@@ -260,6 +261,10 @@ public function getInvalidUrls()
260261
['http://example.com/exploit.html?hel lo'],
261262
['http://example.com/exploit.html?not_a%hex'],
262263
['http://'],
264+
['http://www..com'],
265+
['http://www..example.com'],
266+
['http://wwww.example..com'],
267+
['http://.www.example.com'],
263268
];
264269
}
265270

0 commit comments

Comments
 (0)