Skip to content

Conversation

@sethmlarson
Copy link
Contributor

@sethmlarson sethmlarson commented Jan 21, 2026

GH-122233 added an implementation to Generator to refuse to serialize (write) headers that are unsafely folded or delimited.

This revision adds the same implementation to BytesGenerator, so it gets the same safety protections for unsafely folded or delimited headers

@sethmlarson sethmlarson requested a review from a team as a code owner January 21, 2026 19:15
@sethmlarson sethmlarson added type-security A security issue stdlib Standard Library Python modules in the Lib/ directory topic-email labels Jan 21, 2026
@sethmlarson sethmlarson requested a review from bitdancer January 21, 2026 19:16
pythonGH-122233 added an implementation to `Generator`
to refuse to serialize (write) headers that
are unsafely folded or delimited.

This revision adds the same implementation
to `BytesGenerator`, so it gets the same safety protections
for unsafely folded or delimited headers

Co-authored-by: Denis Ledoux <5822488+beledouxdenis@users.noreply.github.com>
Co-authored-by: Petr Viktorin <302922+encukou@users.noreply.github.com>
Co-authored-by: Bas Bloemsaat <1586868+basbloemsaat@users.noreply.github.com>
@sethmlarson sethmlarson force-pushed the email-verify-headers-in-bytesgenerator branch from cd41a69 to 1132e45 Compare January 21, 2026 19:17
@bedevere-app
Copy link

bedevere-app bot commented Jan 21, 2026

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be poked with soft cushions!

@sethmlarson
Copy link
Contributor Author

@bitdancer I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Jan 22, 2026

Thanks for making the requested changes!

@bitdancer: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from bitdancer January 22, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting change review stdlib Standard Library Python modules in the Lib/ directory topic-email type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants