Skip to content

Commit eb4fbfb

Browse files
committed
gh-142533: Document CRLF vulnerability also for send_response_only
1 parent 3f8dd05 commit eb4fbfb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Doc/library/http.server.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ instantiation, of which this module provides three different variants:
299299
buffered and sent directly the output stream.If the *message* is not
300300
specified, the HTTP message corresponding the response *code* is sent.
301301

302+
This method does not reject *message* containing CRLF sequences.
303+
302304
.. versionadded:: 3.2
303305

304306
.. method:: end_headers()
@@ -557,7 +559,8 @@ Security considerations
557559
requests, this makes it possible for files outside of the specified directory
558560
to be served.
559561

560-
The :meth:`BaseHTTPRequestHandler.send_header` method assumes sanitized input
562+
Methods :meth:`BaseHTTPRequestHandler.send_header` and
563+
:meth:`BaseHTTPRequestHandler.send_response_only` assume sanitized input
561564
and does not perform input validation such as checking for the presence of CRLF
562565
sequences. Untrusted input may result in HTTP Header injection attacks.
563566

0 commit comments

Comments
 (0)