From a3eed2c248067f0319cb72bcc8b5e2c7054ea6dc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 05:06:57 +0200 Subject: Adding upstream version 1.20.1. Signed-off-by: Daniel Baumann --- tests/Test-ftp-pasv-not-supported.px | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 tests/Test-ftp-pasv-not-supported.px (limited to 'tests/Test-ftp-pasv-not-supported.px') diff --git a/tests/Test-ftp-pasv-not-supported.px b/tests/Test-ftp-pasv-not-supported.px new file mode 100755 index 0000000..133814e --- /dev/null +++ b/tests/Test-ftp-pasv-not-supported.px @@ -0,0 +1,56 @@ +#!/usr/bin/env -S perl -I . + +use strict; +use warnings; + +use FTPTest; + +# This test checks whether Wget *does not* fall back from passive mode to +# active mode using a PORT command. Wget <= 1.16.3 made a fallback exposing +# the client's real IP address to the remote FTP server. +# +# This behavior circumvents expected privacy when using a proxy / proxy network (e.g. Tor). +# +# Wget >= 1.16.4 does it right. This test checks it. + +############################################################################### + +# From bug report 10.08.2015 from tomtidaly@sigaint.org +my $afile = < { + content => $afile, + }, +); + +my $cmdline = $WgetTest::WGETPATH . " -S ftp://localhost:{{port}}/afile.txt"; + +my $expected_error_code = 8; + +my %expected_downloaded_files = (); + +############################################################################### + +my $the_test = FTPTest->new ( + server_behavior => {pasv_not_supported => 1}, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, + output => \%expected_downloaded_files); +exit $the_test->run(); + +# vim: et ts=4 sw=4 -- cgit v1.2.3