Closed
Description
Symfony version(s) affected: 4.4.30
Description
The UrlValidator is failing when the url contains multiple subdomains, and when one of the subdomains is a one-char subdomain. Example: "http://subdom1.subdom2.r.suddom3.domain.tld"
The "r" subdomain here makes the validator fail.
Please note that it only happens when the one-char subdomain is positioned between other subdomains.
How to reproduce
/**
* @Assert\NotBlank
* @Assert\Url(protocols = {"https"})
* @ORM\Column(type="string", length=255)
*/
Possible Solution
Review the regex modified 2 weeks ago to allow one-char subdomain.
Additional context
I could see the regex validator was modified around 2 weeks ago, that introduced this failure.
Here is the commit: 074539d