Skip to content
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

Add check to validate absolute URIs #7713

Merged
merged 3 commits into from
Oct 16, 2023
Merged

Add check to validate absolute URIs #7713

merged 3 commits into from
Oct 16, 2023

Conversation

kenballus
Copy link
Contributor

@kenballus kenballus commented Oct 16, 2023

What do these changes do?

This PR adds URI validation to the Python HTTP parser so that it matches llhttp.

Are there changes in behavior for the user?

No changes should be observable, unless the user's HTTP client is sending malformed requests.

Related issue number

Fixes #7712

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 16, 2023
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #7713 (994031a) into master (d7802fe) will decrease coverage by 0.01%.
Report is 2 commits behind head on master.
The diff coverage is 71.42%.

@@            Coverage Diff             @@
##           master    #7713      +/-   ##
==========================================
- Coverage   97.36%   97.35%   -0.01%     
==========================================
  Files         106      106              
  Lines       31689    31696       +7     
  Branches     3626     3629       +3     
==========================================
+ Hits        30854    30859       +5     
- Misses        632      633       +1     
- Partials      203      204       +1     
Flag Coverage Δ
CI-GHA 97.28% <71.42%> (-0.01%) ⬇️
OS-Linux 96.95% <71.42%> (-0.01%) ⬇️
OS-Windows 95.42% <71.42%> (-0.01%) ⬇️
OS-macOS 96.61% <71.42%> (-0.01%) ⬇️
Py-3.10.11 95.35% <71.42%> (-0.01%) ⬇️
Py-3.10.13 96.81% <71.42%> (+<0.01%) ⬆️
Py-3.11.5 96.49% <71.42%> (-0.01%) ⬇️
Py-3.8.10 95.32% <71.42%> (-0.01%) ⬇️
Py-3.8.18 96.74% <71.42%> (-0.01%) ⬇️
Py-3.9.13 95.31% <71.42%> (-0.01%) ⬇️
Py-3.9.18 96.77% <71.42%> (+<0.01%) ⬆️
Py-pypy7.3.11 96.27% <71.42%> (-0.01%) ⬇️
VM-macos 96.61% <71.42%> (-0.01%) ⬇️
VM-ubuntu 96.95% <71.42%> (-0.01%) ⬇️
VM-windows 95.42% <71.42%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
tests/test_http_parser.py 99.17% <100.00%> (+<0.01%) ⬆️
aiohttp/http_parser.py 97.75% <50.00%> (-0.40%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Dreamsorcerer Dreamsorcerer merged commit d697d42 into aio-libs:master Oct 16, 2023
28 of 34 checks passed
@patchback
Copy link
Contributor

patchback bot commented Oct 16, 2023

Backport to 3.9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/3.9/d697d4211b38e435fd59a0ced331989c8b258097/pr-7713

Backported as #7714

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Oct 16, 2023
Dreamsorcerer pushed a commit that referenced this pull request Oct 16, 2023
xiangxli pushed a commit to xiangxli/aiohttp that referenced this pull request Dec 4, 2023
…ute URIs (aio-libs#7714)

**This is a backport of PR aio-libs#7713 as merged into master
(d697d42).**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

absolute-form URIs are not validated
2 participants