Skip to content

Commit 099011e

Browse files
committed
Make class FTP warn of MITM and recommend FTP_TLS instead
1 parent e0a7529 commit 099011e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Doc/library/ftplib.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ FTP objects
8484
.. class:: FTP(host='', user='', passwd='', acct='', timeout=None, \
8585
source_address=None, *, encoding='utf-8')
8686
87+
.. warning::
88+
89+
Use of this class may create a vulnerability to
90+
`man-in-the-middle attack <https://en.wikipedia.org/wiki/Man-in-the-middle_attack>`_,
91+
please consider using the :class:`FTP_TLS` class, and reflect
92+
on your `threat model <https://en.wikipedia.org/wiki/Threat_model>`_
93+
before using an unprotected FTP connection.
94+
8795
Return a new instance of the :class:`FTP` class.
8896

8997
:param str host:

0 commit comments

Comments
 (0)