mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 23:30:50 +02:00
Merge pull request #9991 from kareem-wolfssl/zd21354_2
Disallow wildcard partial domains when using MatchDomainName.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user