summaryrefslogtreecommitdiffstats
path: root/Python/getcompiler.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-03-16 21:08:30 (GMT)
committerGitHub <noreply@github.com>2021-03-16 21:08:30 (GMT)
commit4134f154ae2f621f25c5d698cc0f1748035a1b88 (patch)
tree00fee54dd57c14d592c70d0be003ee1ac7314585 /Python/getcompiler.c
parenta64de63248267acec87a3ffb6de66ee7008977b2 (diff)
downloadcpython-4134f154ae2f621f25c5d698cc0f1748035a1b88.zip
cpython-4134f154ae2f621f25c5d698cc0f1748035a1b88.tar.gz
cpython-4134f154ae2f621f25c5d698cc0f1748035a1b88.tar.bz2
[3.6] bpo-43285 Make ftplib not trust the PASV response. (GH-24838) (GH-24881) (GH-24882)
The IPv4 address value returned from the server in response to the PASV command should not be trusted. This prevents a malicious FTP server from using the response to probe IPv4 address and port combinations on the client network. Instead of using the returned address, we use the IP address we're already connected to. This is the strategy other ftp clients adopted, and matches the only strategy available for the modern IPv6 EPSV command where the server response must return a port number and nothing else. For the rare user who _wants_ this ugly behavior, set a `trust_server_pasv_ipv4_address` attribute on your `ftplib.FTP` instance to True.. (cherry picked from commit 0ab152c6b5d95caa2dc1a30fa96e10258b5f188e) Co-authored-by: Gregory P. Smith <greg@krypto.org> (cherry picked from commit 664d1d16274b47eea6ec92572e1ebf3939a6fa0c)
Diffstat (limited to 'Python/getcompiler.c')
0 files changed, 0 insertions, 0 deletions