File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ This module defines classes for implementing HTTP servers.
2020.. warning ::
2121
2222 :mod: `http.server ` is not recommended for production. It only implements
23- basic security checks.
23+ :ref: ` basic security checks < http.server-security >` .
2424
2525One class, :class: `HTTPServer `, is a :class: `socketserver.TCPServer ` subclass.
2626It creates and listens at the HTTP socket, dispatching the requests to a
@@ -488,3 +488,14 @@ the following command uses a specific directory::
488488the ``--cgi `` option::
489489
490490 python -m http.server --cgi
491+
492+ .. _http.server-security :
493+
494+ Security Considerations
495+ -----------------------
496+
497+ .. index :: pair: http.server; security
498+
499+ :class: `SimpleHTTPRequestHandler ` will follow symbolic links when handling
500+ requests, this makes it possible for files outside of the specified directory
501+ to be served.
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ The following modules have specific security considerations:
1414 argument disabling known insecure and blocked algorithms
1515 <hashlib-usedforsecurity>`
1616* :mod: `http.server ` is not suitable for production use, only implementing
17- basic security checks
17+ basic security checks. See the :ref: ` security considerations < http.server-security >`.
1818* :mod: `logging `: :ref: `Logging configuration uses eval()
1919 <logging-eval-security>`
2020* :mod: `multiprocessing `: :ref: `Connection.recv() uses pickle
You can’t perform that action at this time.
0 commit comments