forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ValidatesAttributes::validateUrl use Symfony/Validator 5.0.7 regex (l…
…aravel#32315) The regex used by url validation logic was previously derived from version 2.7.4 of Symfony Validator component. As it turns out, old regex had a bug where it wouldn't accept urls where domain was a hostname ending with a digit. As such, the urls like http://domain1/ would be considered as invalid. To fix this issue I've updated \Illuminate\Validation\Concerns\ValidatesAttributes::validateUrl method using regex derived from version 5.0.7 of the Symfony Validator component. To make sure that the fix works, new test cases were also added. Co-authored-by: Bartlomiej Sacharski <bartlomiej@cementownia.org>
- Loading branch information
1 parent
65a5551
commit 0fd4c5c
Showing
2 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters