Skip to content

Conversation

@gpshead
Copy link
Member

@gpshead gpshead commented Dec 5, 2022

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.

@gpshead gpshead marked this pull request as ready for review December 5, 2022 10:17
@gpshead gpshead merged commit d8ab0a4 into python:main Dec 5, 2022
@miss-islington
Copy link
Contributor

Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8, 3.9, 3.10, 3.11.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @gpshead, I had trouble checking out the 3.11 backport branch.
Please retry by removing and re-adding the "needs backport to 3.11" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker d8ab0a4dfa48f881b4ac9ab857d2e9de42f72828 3.11

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2022
…ythonGH-100002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>
@bedevere-bot
Copy link

GH-100031 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Dec 5, 2022
@bedevere-bot
Copy link

GH-100032 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2022
…ythonGH-100002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>
@bedevere-bot
Copy link

GH-100033 is a backport of this pull request to the 3.8 branch.

@bedevere-bot
Copy link

GH-100034 is a backport of this pull request to the 3.7 branch.

@gpshead gpshead added needs backport to 3.11 only security fixes and removed needs backport to 3.11 only security fixes labels Dec 5, 2022
@miss-islington
Copy link
Contributor

Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2022
…ythonGH-100002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>
@bedevere-bot
Copy link

GH-100035 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Dec 5, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 5, 2022
…ythonGH-100002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>
@gpshead gpshead deleted the security/http.server/log branch December 5, 2022 21:01
miss-islington added a commit that referenced this pull request Dec 5, 2022
…0002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>
miss-islington added a commit that referenced this pull request Dec 5, 2022
…0002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>
ned-deily pushed a commit that referenced this pull request Dec 5, 2022
…H-100002) (GH-100034)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>
ambv pushed a commit that referenced this pull request Dec 6, 2022
…H-100002) (#100033)

* gh-100001: Omit control characters in http.server stderr logs. (GH-100002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>

* also escape \s (backport of PR #100038).

* add versionadded and remove extraneous 'to'

Co-authored-by: Gregory P. Smith <[email protected]>
ambv pushed a commit that referenced this pull request Dec 6, 2022
…H-100002) (#100032)

* gh-100001: Omit control characters in http.server stderr logs. (GH-100002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4)

Co-authored-by: Gregory P. Smith <[email protected]>

* also escape \s (backport of PR #100038).

* add versionadded and remove extra 'to'

Co-authored-by: Gregory P. Smith <[email protected]>
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.

5 participants