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

gh-100001: Omit control characters in http.server stderr logs. #100002

Merged
merged 9 commits into from Dec 5, 2022

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 Dec 5, 2022
@gpshead gpshead requested review from Yhg1s, pablogsal and vstinner Dec 5, 2022
Lib/http/server.py Outdated Show resolved Hide resolved
Lib/http/server.py Outdated Show resolved Hide resolved
@gpshead gpshead merged commit d8ab0a4 into python:main Dec 5, 2022
15 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Dec 5, 2022

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

miss-islington commented Dec 5, 2022

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 <greg@krypto.org>
@bedevere-bot
Copy link

bedevere-bot commented Dec 5, 2022

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

@bedevere-bot
Copy link

bedevere-bot commented Dec 5, 2022

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 <greg@krypto.org>
@bedevere-bot
Copy link

bedevere-bot commented Dec 5, 2022

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

@bedevere-bot
Copy link

bedevere-bot commented Dec 5, 2022

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

@miss-islington
Copy link
Contributor

miss-islington commented Dec 5, 2022

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 <greg@krypto.org>
@bedevere-bot
Copy link

bedevere-bot commented Dec 5, 2022

GH-100035 is a backport of this pull request to the 3.11 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 <greg@krypto.org>
@gpshead gpshead deleted the security/http.server/log branch Dec 5, 2022
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 <greg@krypto.org>
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 <greg@krypto.org>
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 <greg@krypto.org>
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 <greg@krypto.org>

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

* add versionadded and remove extraneous 'to'

Co-authored-by: Gregory P. Smith <greg@krypto.org>
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 <greg@krypto.org>

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

* add versionadded and remove extra 'to'

Co-authored-by: Gregory P. Smith <greg@krypto.org>
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.

None yet

5 participants