Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
e97b2fa7
Commit
e97b2fa7
authored
Jul 15, 2013
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Plain Diff
Merge github pull request
parents
15b5b526
7ddd872c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
setuptools/ssl_support.py
setuptools/ssl_support.py
+8
-1
No files found.
setuptools/ssl_support.py
View file @
e97b2fa7
...
...
@@ -88,9 +88,16 @@ except ImportError:
class
CertificateError
(
ValueError
):
pass
def
_dnsname_to_pat
(
dn
):
def
_dnsname_to_pat
(
dn
,
max_wildcards
=
1
):
pats
=
[]
for
frag
in
dn
.
split
(
r'.'
):
if
frag
.
count
(
'*'
)
>
max_wildcards
:
# Issue #17980: avoid denials of service by refusing more
# than one wildcard per fragment. A survery of established
# policy among SSL implementations showed it to be a
# reasonable choice.
raise
CertificateError
(
"too many wildcards in certificate DNS name: "
+
repr
(
dn
))
if
frag
==
'*'
:
# When '*' is a fragment by itself, it matches a non-empty dotless
# fragment.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment