Add a security warning to pydoc#150409
Conversation
picnixz
left a comment
There was a problem hiding this comment.
Yeah, I'm tired of closing reports that claim vulns when it affects a dev component. So I'm in favor of that. But move that warning below (L75 in your PR) where we mention HTTP server. pydoc can be used in the CLI
Documentation build overview
|
I'll disagree here, the introductory paragraph introduces that it can "served to a web browser," and there is no section specifically for the HTTP server. I'd generally prefer to put warnings in visible places (i.e., at the top of sections). |
|
Seems reasonable to me! I don't have an opinion on placement. |
The paragraph serves a section for me. It has sufficient information about the port as well:
The fact that it serves localhost is important as well. So I would prefer having it there. Serving to a web browser has nothing to do with the HTTP server itself. You can serve to a webbrowser using other means. What's vulnerable is the HTTP server itself. Note that someone wanting to know about the HTTP server itself may have Google jump to that sentence in the paragraph specifically. And having the warning closer is better. Especially if we use the words "especially useful". |
|
Discussing the position isn't particularly productive, so I've conceded and moved it. |
picnixz
left a comment
There was a problem hiding this comment.
Thank you! I simulated a user asking how to use pydoc HTTP and since the CLI for -p/-n is below on the page, you don't see it directly. So when you search for it, you'll see the warning at the correct place. Otherwise, you might miss the warning.
To make it better, I would suggest that we actually have separate sections so that web browsers can directly jump to it (follow-up PR). WDYT?
I don't have a strong opinion, but I wouldn't object either. |
|
Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-150573 is a backport of this pull request to the 3.15 branch. |
|
GH-150574 is a backport of this pull request to the 3.14 branch. |
|
GH-150575 is a backport of this pull request to the 3.13 branch. |
|
Thanks all for the reviews, hopefully this will be the end of the reports! |
(cherry picked from commit 5535c1f) Co-authored-by: Stan Ulbrych <stan@python.org>
(cherry picked from commit 5535c1f) Co-authored-by: Stan Ulbrych <stan@python.org>
@picnixz and @woodruffw IIRC you've also suggested this before.