Skip to content

parse auth headers using pyparsing instead of regexp #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 6, 2021

Conversation

temoto
Copy link
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
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
Member Author

temoto commented Jan 9, 2021

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

@codecov
Copy link

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

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

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
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy