Skip to content

Commit 9372b40

Browse files
committed
Make documentation of FTP_TLS.prot_p and .prot_c promote security
1 parent 099011e commit 9372b40

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Doc/library/ftplib.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,11 +550,18 @@ FTP_TLS objects
550550

551551
.. method:: FTP_TLS.prot_p()
552552

553-
Set up secure data connection.
553+
Set up secure data connection (with TLS).
554554

555555
.. method:: FTP_TLS.prot_c()
556556

557-
Set up clear text data connection.
557+
Set up clear text data connection (without TLS).
558+
559+
.. warning::
560+
561+
Calling this method may create a vulnerability to
562+
`man-in-the-middle attack <https://en.wikipedia.org/wiki/Man-in-the-middle_attack>`_.
563+
Please reflect on your `threat model <https://en.wikipedia.org/wiki/Threat_model>`_
564+
before requesting clear text data connection without TLS.
558565

559566

560567
Module variables

0 commit comments

Comments
 (0)