René's URL Explorer Experiment


Title: Reject outbound header blocks with invalid headers by alexwlchan · Pull Request #289 · python-hyper/h2 · GitHub

Open Graph Title: Reject outbound header blocks with invalid headers by alexwlchan · Pull Request #289 · python-hyper/h2

X Title: Reject outbound header blocks with invalid headers by alexwlchan · Pull Request #289 · python-hyper/h2

Description: There are several rules we use to reject inbound header blocks as invalid, but we don't enforce them on headers we're sending: A Transfer-Encoding header must have value "trailers". No blocks should have connection-specific headers. These are rules mandated by RFC 7540. We already have the code to police these rules, so apply it to outbound as well as inbound headers. Inbound headers always have byte strings for names/values, whereas we may still have Unicode strings for the outbound headers (they're encoded after this validation step), so we need to be tolerant to Unicode headers here. This is a first attempt at tackling #262. (2) and (3) are now enforced on outgoing headers. Slightly complicated by the Unicode issue, which makes this pipeline a tad slower throughout. Is this is a sensible way to handle it? I haven’t done the checks for duplicate pseudo-header fields yet, because that’s a bit more complicated. Specifically, we do if header[0].startswith(b':'), which only works if header[0] is a bytestring. You get a TypeError if you call it on a Unicode string. Doesn’t have to be done here, but any suggestions?

Open Graph Description: There are several rules we use to reject inbound header blocks as invalid, but we don't enforce them on headers we're sending: A Transfer-Encoding header must have value "trailers&quo...

X Description: There are several rules we use to reject inbound header blocks as invalid, but we don't enforce them on headers we're sending: A Transfer-Encoding header must have value "...

Opengraph URL: https://github.com/python-hyper/h2/pull/289

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:46e6ba93-7cc1-ca4c-ef9a-771f8b81e530
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCF26:1BD2F2:13DFBF:1B9242:6B06F6CC
html-safe-nonce2769bf71f28c9e394c1a3679ddb20a0d17a5e722b75d9008c1ebc16ecfe734e5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjI2OjFCRDJGMjoxM0RGQkY6MUI5MjQyOjZCMDZGNkNDIiwidmlzaXRvcl9pZCI6IjU2ODk2MDA2NDU0NjkyMzg5ODgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac243a2f59ab77a9ffda6e824172a254cdb5cbfa4b64a5408b7bc376383c650707
hovercard-subject-tagpull_request:81716382
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-hyper/h2/pull/289/files
twitter:imagehttps://avatars.githubusercontent.com/u/301220?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/301220?s=400&v=4
og:image:altThere are several rules we use to reject inbound header blocks as invalid, but we don't enforce them on headers we're sending: A Transfer-Encoding header must have value "trailers&quo...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None518c89df9981b23ef4bf1cf9e25792a20e5884aa6a2efccd817801f8bae3dd64
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python-hyper/h2 git https://github.com/python-hyper/h2.git
octolytics-dimension-user_id13035907
octolytics-dimension-user_loginpython-hyper
octolytics-dimension-repository_id37996233
octolytics-dimension-repository_nwopython-hyper/h2
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id37996233
octolytics-dimension-repository_network_root_nwopython-hyper/h2
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3e66657d0989666cd38e3fb0fbd4e0c116e481e6
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-hyper/h2/pull/289/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-hyper%2Fh2%2Fpull%2F289%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-hyper%2Fh2%2Fpull%2F289%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-hyper%2Fh2
Reloadhttps://github.com/python-hyper/h2/pull/289/files
Reloadhttps://github.com/python-hyper/h2/pull/289/files
Reloadhttps://github.com/python-hyper/h2/pull/289/files
python-hyperhttps://github.com/python-hyper
h2https://github.com/python-hyper/h2
Codehttps://github.com/python-hyper/h2
Issues21 (21)https://github.com/python-hyper/h2/issues
Pull requests23 (23)https://github.com/python-hyper/h2/pulls
Actionshttps://github.com/python-hyper/h2/actions
Projectshttps://github.com/python-hyper/h2/projects
Wikihttps://github.com/python-hyper/h2/wiki
Security and quality2 (2)https://github.com/python-hyper/h2/security
Insightshttps://github.com/python-hyper/h2/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-hyper%2Fh2%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-hyper%2Fh2%2Fissues%2Fnew%2Fchoose
Lukasahttps://github.com/Lukasa
masterhttps://github.com/python-hyper/h2/tree/master
awlc/outbound-validationhttps://github.com/python-hyper/h2/tree/awlc/outbound-validation
Conversation 21 https://github.com/python-hyper/h2/pull/289
Commits 6 https://github.com/python-hyper/h2/pull/289/commits
Checks 0 https://github.com/python-hyper/h2/pull/289/checks
Files changed https://github.com/python-hyper/h2/pull/289/files
Please reload this pagehttps://github.com/python-hyper/h2/pull/289/files
Reject outbound header blocks with invalid headers https://github.com/python-hyper/h2/pull/289/files#top
Show all changes 6 commits https://github.com/python-hyper/h2/pull/289/files
cde955b Reject outbound header blocks with invalid headers alexwlchan Aug 17, 2016 https://github.com/python-hyper/h2/pull/289/commits/cde955b3fad8e8934c2cb36a8a3140a5e862c022
687a58d Reject outbound headers with bad pseudo-header fields alexwlchan Aug 19, 2016 https://github.com/python-hyper/h2/pull/289/commits/687a58d444022fef9e8a96832434022e6ca2b5c0
220c502 Add a changelog entry alexwlchan Aug 19, 2016 https://github.com/python-hyper/h2/pull/289/commits/220c5027643f21730e562cfcd2ae51c3029d8f01
a96fe9c Tidy up changelog alexwlchan Aug 19, 2016 https://github.com/python-hyper/h2/pull/289/commits/a96fe9c8a457d5714ef4af063931d11257328bca
565f300 Remove unnecessary call to `strip()` alexwlchan Aug 29, 2016 https://github.com/python-hyper/h2/pull/289/commits/565f300a1a4c30c34927c5c90c6afa166f82ab46
d5009d0 Remove "breaking bugfixes" header from HISTORY.rst alexwlchan Aug 30, 2016 https://github.com/python-hyper/h2/pull/289/commits/d5009d0a50e1495dff3b62a16aa498051c33dbd2
Clear filters https://github.com/python-hyper/h2/pull/289/files
Please reload this pagehttps://github.com/python-hyper/h2/pull/289/files
Please reload this pagehttps://github.com/python-hyper/h2/pull/289/files
HISTORY.rst https://github.com/python-hyper/h2/pull/289/files#diff-e2de3cbc57ab9b097fca7d7c444c094ba3c1d4ee92b36d972d0d9d49669436cc
utilities.py https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
test_basic_logic.py https://github.com/python-hyper/h2/pull/289/files#diff-749e7107ff19f277821078810a3f027387365eedcabcbd40fef4bafbf1fb692b
test_invalid_headers.py https://github.com/python-hyper/h2/pull/289/files#diff-429715aa43394e79a56ec4a1691b69cd977eacee477e39abb651704a87b13143
HISTORY.rsthttps://github.com/python-hyper/h2/pull/289/files#diff-e2de3cbc57ab9b097fca7d7c444c094ba3c1d4ee92b36d972d0d9d49669436cc
View file https://github.com/python-hyper/h2/blob/d5009d0a50e1495dff3b62a16aa498051c33dbd2/HISTORY.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-hyper/h2/pull/289/{{ revealButtonHref }}
https://github.com/python-hyper/h2/pull/289/files#diff-e2de3cbc57ab9b097fca7d7c444c094ba3c1d4ee92b36d972d0d9d49669436cc
https://github.com/python-hyper/h2/pull/289/files#diff-e2de3cbc57ab9b097fca7d7c444c094ba3c1d4ee92b36d972d0d9d49669436cc
h2/utilities.pyhttps://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
View file https://github.com/python-hyper/h2/blob/d5009d0a50e1495dff3b62a16aa498051c33dbd2/h2/utilities.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-hyper/h2/pull/289/{{ revealButtonHref }}
https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
https://github.com/python-hyper/h2/pull/289/files#diff-8f14206df80e22b2823fb9caa24e751f31c2118acf77eac025e77de413edf319
test/test_basic_logic.pyhttps://github.com/python-hyper/h2/pull/289/files#diff-749e7107ff19f277821078810a3f027387365eedcabcbd40fef4bafbf1fb692b
View file https://github.com/python-hyper/h2/blob/d5009d0a50e1495dff3b62a16aa498051c33dbd2/test/test_basic_logic.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-hyper/h2/pull/289/{{ revealButtonHref }}
https://github.com/python-hyper/h2/pull/289/files#diff-749e7107ff19f277821078810a3f027387365eedcabcbd40fef4bafbf1fb692b
Lukasahttps://github.com/Lukasa
Aug 19, 2016https://github.com/python-hyper/h2/pull/289/files#r75471175
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python-hyper/h2/pull/289/files
alexwlchanhttps://github.com/alexwlchan
Aug 19, 2016https://github.com/python-hyper/h2/pull/289/files#r75521691
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python-hyper/h2/pull/289/files
Lukasahttps://github.com/Lukasa
Aug 19, 2016https://github.com/python-hyper/h2/pull/289/files#r75542537
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python-hyper/h2/pull/289/files
https://github.com/python-hyper/h2/pull/289/files#diff-749e7107ff19f277821078810a3f027387365eedcabcbd40fef4bafbf1fb692b
test/test_invalid_headers.pyhttps://github.com/python-hyper/h2/pull/289/files#diff-429715aa43394e79a56ec4a1691b69cd977eacee477e39abb651704a87b13143
View file https://github.com/python-hyper/h2/blob/d5009d0a50e1495dff3b62a16aa498051c33dbd2/test/test_invalid_headers.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-hyper/h2/pull/289/{{ revealButtonHref }}
https://github.com/python-hyper/h2/pull/289/files#diff-429715aa43394e79a56ec4a1691b69cd977eacee477e39abb651704a87b13143
https://github.com/python-hyper/h2/pull/289/files#diff-429715aa43394e79a56ec4a1691b69cd977eacee477e39abb651704a87b13143
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.