Skip to content

Commit bd0f2a1

Browse files
ambvdignissimus
andauthored
[3.8] gh-81054: Document that SimpleHTTPRequestHandler follows symbolic links (GH-94416) (GH-94495)
(cherry picked from commit 80aaeab) Co-authored-by: Sam Ezeh <[email protected]>
1 parent 51f1ae5 commit bd0f2a1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Doc/library/http.server.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This module defines classes for implementing HTTP servers (Web 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

2525
One class, :class:`HTTPServer`, is a :class:`socketserver.TCPServer` subclass.
2626
It creates and listens at the HTTP socket, dispatching the requests to a
@@ -477,3 +477,14 @@ the following command uses a specific directory::
477477
the ``--cgi`` option::
478478

479479
python -m http.server --cgi 8000
480+
481+
.. _http.server-security:
482+
483+
Security Considerations
484+
-----------------------
485+
486+
.. index:: pair: http.server; security
487+
488+
:class:`SimpleHTTPRequestHandler` will follow symbolic links when handling
489+
requests, this makes it possible for files outside of the specified directory
490+
to be served.

0 commit comments

Comments
 (0)