We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd3385c commit 5624d6eCopy full SHA for 5624d6e
src/Assert/DomainTrait.php
@@ -14,7 +14,7 @@ trait DomainTrait
14
{
15
private static string $domain_regex = '/^
16
(?!\-)
17
- (?:(?:[a-zA-Z\d][a-zA-Z\d\-]{0,61})?[a-zA-Z\d]\.){1,126}
+ (?:(?:[a-zA-Z\d][a-zA-Z\d\-]{0,61})?[a-zA-Z\d]\.){0,126}
18
(?!\d+)[a-zA-Z\d]{1,63}
19
$/Dxi';
20
tests/SAML2/Assert/DomainTest.php
@@ -45,7 +45,8 @@ public static function provideDomain(): array
45
'ipv4' => [false, '192.168.0.1'],
46
'ipv6' => [false, '2001:0000:130F:0000:0000:09C0:876A:130B'],
47
'with scheme' => [false, 'https://simplesamlphp.org'],
48
- 'tld' => [false, '.org'],
+ 'start with dot' => [false, '.org'],
49
+ 'tld' => [true, 'nl'],
50
];
51
}
52
0 commit comments