Skip to content

Commit 679366a

Browse files
authored
Merge pull request #9991 from kareem-wolfssl/zd21354_2
Disallow wildcard partial domains when using MatchDomainName.
2 parents 3e8338d + 76c52c3 commit 679366a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/internal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13230,6 +13230,11 @@ int MatchDomainName(const char* pattern, int patternLen, const char* str,
1323013230

1323113231
/* Only single wildcard allowed with strict left only */
1323213232
if (leftWildcardOnly) {
13233+
/* For the left wildcard only case, disallow wildcards with
13234+
* the pattern *domain.com and only allow *.domain.com. */
13235+
if (patternLen > 0 && *pattern != '.')
13236+
return 0;
13237+
1323313238
wildcardEligible = 0;
1323413239
}
1323513240

0 commit comments

Comments
 (0)