gh-143916: Reject control characters in wsgiref.headers.Headers by sethmlarson · Pull Request #143917 · python/cpython · GitHub
Skip to content

gh-143916: Reject control characters in wsgiref.headers.Headers - #143917

Merged
gpshead merged 2 commits into
python:mainfrom
sethmlarson:reject-control-characters-wsgiref
Jan 17, 2026
Merged

gpshead merged 2 commits into
python:mainfrom
sethmlarson:reject-control-characters-wsgiref

Conversation

@sethmlarson

@sethmlarson sethmlarson commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

@sethmlarson sethmlarson added type-security A security issue needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Jan 16, 2026
@sethmlarson
sethmlarson requested a review from gpshead January 16, 2026 17:08
Comment thread Lib/test/test_wsgiref.py
@gpshead
gpshead merged commit f7fceed into python:main Jan 17, 2026
65 checks passed
@miss-islington-app

Copy link
Copy Markdown

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2026
…pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers
(cherry picked from commit f7fceed)

Co-authored-by: Seth Michael Larson <seth@python.org>
@miss-islington-app

Copy link
Copy Markdown

Sorry, @sethmlarson and @gpshead, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f7fceed79ca1bceae8dbe5ba5bc8928564da7211 3.13

@miss-islington-app

Copy link
Copy Markdown

Sorry, @sethmlarson and @gpshead, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f7fceed79ca1bceae8dbe5ba5bc8928564da7211 3.12

@bedevere-app

bedevere-app Bot commented Jan 17, 2026

Copy link
Copy Markdown

GH-143972 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jan 17, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @sethmlarson and @gpshead, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f7fceed79ca1bceae8dbe5ba5bc8928564da7211 3.11

@miss-islington-app

Copy link
Copy Markdown

Sorry, @sethmlarson and @gpshead, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f7fceed79ca1bceae8dbe5ba5bc8928564da7211 3.10

gpshead pushed a commit to gpshead/cpython that referenced this pull request Jan 17, 2026
…pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)
@gpshead

gpshead commented Jan 17, 2026

Copy link
Copy Markdown
Member

#143973 for 3.13

@bedevere-app

bedevere-app Bot commented Jan 17, 2026

Copy link
Copy Markdown

GH-143973 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jan 17, 2026
gpshead added a commit that referenced this pull request Jan 17, 2026
GH-143917) (#143973)

gh-143916: Reject control characters in wsgiref.headers.Headers  (GH-143917)

* Add 'test.support' fixture for C0 control characters
* gh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)

Co-authored-by: Seth Michael Larson <seth@python.org>
gpshead added a commit to gpshead/cpython that referenced this pull request Jan 17, 2026
…Headers (pythonGH-143917) (pythonGH-143973)

pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)
(cherry picked from commit 22e4d55)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
gpshead added a commit to gpshead/cpython that referenced this pull request Jan 17, 2026
…Headers (pythonGH-143917) (pythonGH-143973)

pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)
(cherry picked from commit 22e4d55)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
gpshead added a commit to gpshead/cpython that referenced this pull request Jan 17, 2026
…Headers (pythonGH-143917) (pythonGH-143973)

pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)
(cherry picked from commit 22e4d55)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
@bedevere-bot

Copy link
Copy Markdown

Yhg1s pushed a commit that referenced this pull request Jan 19, 2026
GH-143917) (GH-143973) (#143974)

* Add 'test.support' fixture for C0 control characters
* gh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)
(cherry picked from commit 22e4d55)

Co-authored-by: Seth Michael Larson <seth@python.org>
sethmlarson added a commit that referenced this pull request Jan 20, 2026
gh-143916: Reject control characters in wsgiref.headers.Headers  (GH-143917)

* Add 'test.support' fixture for C0 control characters
* gh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)
(cherry picked from commit 22e4d55)

Co-authored-by: Seth Michael Larson <seth@python.org>
sethmlarson added a commit that referenced this pull request Jan 20, 2026
gh-143916: Reject control characters in wsgiref.headers.Headers  (GH-143917)

* Add 'test.support' fixture for C0 control characters
* gh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)
(cherry picked from commit 22e4d55)

Co-authored-by: Seth Michael Larson <seth@python.org>
frenzymadness pushed a commit to frenzymadness/cpython that referenced this pull request Jan 30, 2026
pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit f7fceed)
(cherry picked from commit 22e4d55)

Co-authored-by: Seth Michael Larson <seth@python.org>
frenzymadness pushed a commit to frenzymadness/cpython that referenced this pull request Feb 2, 2026
pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit 2f84024)

Co-authored-by: Seth Michael Larson <seth@python.org>
hroncok pushed a commit to fedora-python/cpython that referenced this pull request Feb 3, 2026
pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers

(cherry picked from commit 2f84024)

Co-authored-by: Seth Michael Larson <seth@python.org>
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Feb 6, 2026
 pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Feb 6, 2026
 pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Feb 9, 2026
 pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Feb 9, 2026
 pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers
hrnciar pushed a commit to fedora-python/cpython that referenced this pull request Feb 9, 2026
 pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers
@sethmlarson
sethmlarson deleted the reject-control-characters-wsgiref branch February 12, 2026 20:41
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers
@hugovk hugovk removed needs backport to 3.12 only security fixes needs backport to 3.11 only security fixes needs backport to 3.10 only security fixes labels Feb 27, 2026
hroncok pushed a commit to fedora-python/cpython that referenced this pull request Mar 26, 2026
 pythongh-143916: Reject control characters in wsgiref.headers.Headers  (pythonGH-143917)

* Add 'test.support' fixture for C0 control characters
* pythongh-143916: Reject control characters in wsgiref.headers.Headers
ahi647958-spec

This comment was marked as spam.

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

Labels

type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants