Skip to content

Commit

Permalink
Merge pull request #15730 from qnrq/patch-6
Browse files Browse the repository at this point in the history
Fixes CVE-2013-2099 in audit.ssl_certificate
  • Loading branch information
andresriancho committed Jun 22, 2017
2 parents 27b1516 + 20e8502 commit db844e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion w3af/plugins/audit/ssl_certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,12 @@ class CertificateError(Exception):
pass


def _dnsname_to_pat(dn):
def _dnsname_to_pat(dn, max_wildcards=2):
pats = []
for frag in dn.split(r'.'):
if frag.count('*') > max_wildcards:
raise CertificateError("too many wildcards in certificate name: "
+ repr(dn))
if frag == '*':
# When '*' is a fragment by itself, it matches a non-empty dotless
# fragment.
Expand Down

0 comments on commit db844e5

Please sign in to comment.