Skip to content

Commit e8b5393

Browse files
Fix redos bug around Negotiate expression
1 parent c90ea11 commit e8b5393

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

requests_gssapi/gssapi_.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,10 @@ def _negotiate_value(response):
6767
else:
6868
# There's no need to re-compile this EVERY time it is called. Compile
6969
# it once and you won't have the performance hit of the compilation.
70-
regex = re.compile(r'(?:.*,)*\s*Negotiate\s*([^,]*),?', re.I)
70+
regex = re.compile(r'Negotiate\s*([^,]*)', re.I)
7171
_negotiate_value.regex = regex
7272

7373
authreq = response.headers.get('www-authenticate', None)
74-
7574
if authreq:
7675
match_obj = regex.search(authreq)
7776
if match_obj:

0 commit comments

Comments
 (0)