Skip to content

parse auth headers using pyparsing instead of regexp#182

Merged
temoto merged 1 commit intomasterfrom
www-auth-pyparsing
Feb 6, 2021
Merged

parse auth headers using pyparsing instead of regexp#182
temoto merged 1 commit intomasterfrom
www-auth-pyparsing

Conversation

@temoto
Copy link
Copy Markdown
Member

@temoto temoto commented Jan 9, 2021

Fixes CPU burn DoS by cubic complexity of whitespace matching in
WWW_AUTH_RELAXED (default) regexp.

@temoto temoto requested review from cdent and dims January 9, 2021 17:49
@temoto
Copy link
Copy Markdown
Member Author

temoto commented Jan 9, 2021

@b-c-ds please take a look too, I can't add you to reviewers.

@temoto temoto force-pushed the www-auth-pyparsing branch from b9a3c22 to 987e995 Compare January 9, 2021 18:18
@temoto
Copy link
Copy Markdown
Member Author

temoto commented Jan 9, 2021

minor update in script/release to read __version__ in source without installing pyparsing

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 9, 2021

Codecov Report

Merging #182 (bd9ee25) into master (33090ab) will increase coverage by 0.10%.
The diff coverage is 85.10%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
+ Coverage   76.16%   76.26%   +0.10%     
==========================================
  Files           8       12       +4     
  Lines        2618     2667      +49     
==========================================
+ Hits         1994     2034      +40     
- Misses        624      633       +9     
Impacted Files Coverage Δ
python3/httplib2/__init__.py 83.66% <75.43%> (-0.84%) ⬇️
python2/httplib2/__init__.py 83.20% <78.57%> (-0.39%) ⬇️
python2/httplib2/error.py 88.00% <88.00%> (ø)
python2/httplib2/auth.py 91.66% <91.66%> (ø)
python3/httplib2/auth.py 91.66% <91.66%> (ø)
python3/httplib2/error.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33090ab...bd9ee25. Read the comment docs.

@b-c-ds
Copy link
Copy Markdown

b-c-ds commented Jan 9, 2021

@temoto I'd never heard of the pyparsing module before... seems like a great alternative to regex. Looks good to me. 👍

Fixes CPU burn DoS by cubic complexity of whitespace matching in
WWW_AUTH_RELAXED (default) regexp.
@temoto temoto force-pushed the www-auth-pyparsing branch from 987e995 to bd9ee25 Compare January 27, 2021 12:47
@b-c-ds
Copy link
Copy Markdown

b-c-ds commented Feb 4, 2021

Hello, do you know when you are planning to merge this?

@temoto temoto merged commit bd9ee25 into master Feb 6, 2021
@github-pages github-pages Bot temporarily deployed to github-pages February 6, 2021 21:23 Inactive
@temoto temoto deleted the www-auth-pyparsing branch February 6, 2021 21:25
@temoto
Copy link
Copy Markdown
Member Author

temoto commented Feb 8, 2021

@b-c-ds hey, thanks for reminder, I was waiting for more reviews. This fix is released in 0.19.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants