Merge pull request #9991 from kareem-wolfssl/zd21354_2

Disallow wildcard partial domains when using MatchDomainName.
This commit is contained in:
David Garske
2026-03-19 12:35:14 -07:00
committed by GitHub
+5
View File
@@ -13230,6 +13230,11 @@ int MatchDomainName(const char* pattern, int patternLen, const char* str,
/* Only single wildcard allowed with strict left only */
if (leftWildcardOnly) {
/* For the left wildcard only case, disallow wildcards with
* the pattern *domain.com and only allow *.domain.com. */
if (patternLen > 0 && *pattern != '.')
return 0;
wildcardEligible = 0;
}