ftpd 1.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Changelog.md +15 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +57 -48
- data/README.md +8 -1
- data/VERSION +1 -1
- data/examples/example.rb +12 -0
- data/features/example/step_definitions/example_server.rb +2 -0
- data/features/ftp_server/eprt.feature +1 -0
- data/features/ftp_server/epsv.feature +1 -0
- data/features/ftp_server/get_ipv6.feature +3 -0
- data/features/ftp_server/pasv.feature +10 -3
- data/features/ftp_server/step_definitions/logging.rb +2 -0
- data/features/ftp_server/step_definitions/test_server.rb +6 -0
- data/features/step_definitions/append.rb +2 -0
- data/features/step_definitions/client.rb +3 -0
- data/features/step_definitions/client_and_server_files.rb +2 -0
- data/features/step_definitions/client_files.rb +2 -0
- data/features/step_definitions/command.rb +2 -0
- data/features/step_definitions/connect.rb +2 -0
- data/features/step_definitions/delete.rb +2 -0
- data/features/step_definitions/directory_navigation.rb +2 -0
- data/features/step_definitions/error_replies.rb +2 -0
- data/features/step_definitions/features.rb +2 -0
- data/features/step_definitions/file_structure.rb +2 -0
- data/features/step_definitions/generic_send.rb +2 -0
- data/features/step_definitions/get.rb +2 -0
- data/features/step_definitions/help.rb +2 -0
- data/features/step_definitions/invalid_commands.rb +2 -0
- data/features/step_definitions/ipv6.rb +11 -0
- data/features/step_definitions/line_endings.rb +2 -0
- data/features/step_definitions/list.rb +2 -0
- data/features/step_definitions/login.rb +2 -0
- data/features/step_definitions/mkdir.rb +2 -0
- data/features/step_definitions/mode.rb +2 -0
- data/features/step_definitions/mtime.rb +2 -0
- data/features/step_definitions/noop.rb +2 -0
- data/features/step_definitions/options.rb +2 -0
- data/features/step_definitions/passive.rb +7 -0
- data/features/step_definitions/pending.rb +2 -0
- data/features/step_definitions/port.rb +2 -0
- data/features/step_definitions/put.rb +2 -0
- data/features/step_definitions/quit.rb +2 -0
- data/features/step_definitions/rename.rb +2 -0
- data/features/step_definitions/rmdir.rb +2 -0
- data/features/step_definitions/server_files.rb +2 -0
- data/features/step_definitions/server_title.rb +2 -0
- data/features/step_definitions/size.rb +2 -0
- data/features/step_definitions/status.rb +2 -0
- data/features/step_definitions/success_replies.rb +2 -0
- data/features/step_definitions/system.rb +5 -0
- data/features/step_definitions/timing.rb +2 -0
- data/features/step_definitions/type.rb +2 -0
- data/features/support/env.rb +2 -0
- data/features/support/example_server.rb +3 -1
- data/features/support/test_client.rb +27 -19
- data/features/support/test_file_templates.rb +2 -0
- data/features/support/test_server.rb +31 -20
- data/features/support/test_server_files.rb +2 -0
- data/ftpd.gemspec +17 -11
- data/lib/ftpd.rb +2 -0
- data/lib/ftpd/auth_levels.rb +2 -0
- data/lib/ftpd/cmd_abor.rb +2 -0
- data/lib/ftpd/cmd_allo.rb +2 -0
- data/lib/ftpd/cmd_appe.rb +2 -0
- data/lib/ftpd/cmd_auth.rb +2 -0
- data/lib/ftpd/cmd_cdup.rb +2 -0
- data/lib/ftpd/cmd_cwd.rb +2 -0
- data/lib/ftpd/cmd_dele.rb +2 -0
- data/lib/ftpd/cmd_eprt.rb +2 -0
- data/lib/ftpd/cmd_epsv.rb +4 -2
- data/lib/ftpd/cmd_feat.rb +2 -0
- data/lib/ftpd/cmd_help.rb +2 -0
- data/lib/ftpd/cmd_list.rb +2 -0
- data/lib/ftpd/cmd_login.rb +2 -0
- data/lib/ftpd/cmd_mdtm.rb +2 -0
- data/lib/ftpd/cmd_mkd.rb +2 -0
- data/lib/ftpd/cmd_mode.rb +2 -0
- data/lib/ftpd/cmd_nlst.rb +2 -0
- data/lib/ftpd/cmd_noop.rb +2 -0
- data/lib/ftpd/cmd_opts.rb +2 -0
- data/lib/ftpd/cmd_pasv.rb +5 -3
- data/lib/ftpd/cmd_pbsz.rb +2 -0
- data/lib/ftpd/cmd_port.rb +2 -0
- data/lib/ftpd/cmd_prot.rb +2 -0
- data/lib/ftpd/cmd_pwd.rb +2 -0
- data/lib/ftpd/cmd_quit.rb +2 -0
- data/lib/ftpd/cmd_rein.rb +2 -0
- data/lib/ftpd/cmd_rename.rb +2 -0
- data/lib/ftpd/cmd_rest.rb +2 -0
- data/lib/ftpd/cmd_retr.rb +2 -0
- data/lib/ftpd/cmd_rmd.rb +2 -0
- data/lib/ftpd/cmd_site.rb +2 -0
- data/lib/ftpd/cmd_size.rb +2 -0
- data/lib/ftpd/cmd_smnt.rb +2 -0
- data/lib/ftpd/cmd_stat.rb +2 -0
- data/lib/ftpd/cmd_stor.rb +2 -0
- data/lib/ftpd/cmd_stou.rb +2 -0
- data/lib/ftpd/cmd_stru.rb +2 -0
- data/lib/ftpd/cmd_syst.rb +2 -0
- data/lib/ftpd/cmd_type.rb +2 -0
- data/lib/ftpd/command_handler.rb +3 -0
- data/lib/ftpd/command_handler_factory.rb +2 -0
- data/lib/ftpd/command_handlers.rb +2 -0
- data/lib/ftpd/command_loop.rb +2 -0
- data/lib/ftpd/command_sequence_checker.rb +2 -0
- data/lib/ftpd/config.rb +2 -0
- data/lib/ftpd/connection_throttle.rb +2 -0
- data/lib/ftpd/connection_tracker.rb +2 -0
- data/lib/ftpd/data_connection_helper.rb +2 -0
- data/lib/ftpd/data_server_factory.rb +44 -0
- data/lib/ftpd/data_server_factory/random_ephemeral_port.rb +26 -0
- data/lib/ftpd/data_server_factory/specific_port_range.rb +37 -0
- data/lib/ftpd/disk_file_system.rb +2 -0
- data/lib/ftpd/error.rb +2 -0
- data/lib/ftpd/exception_translator.rb +2 -0
- data/lib/ftpd/exceptions.rb +2 -0
- data/lib/ftpd/file_info.rb +2 -0
- data/lib/ftpd/file_system_helper.rb +2 -0
- data/lib/ftpd/ftp_server.rb +27 -0
- data/lib/ftpd/gets_peer_address.rb +2 -0
- data/lib/ftpd/insecure_certificate.rb +2 -0
- data/lib/ftpd/list_format/eplf.rb +2 -0
- data/lib/ftpd/list_format/ls.rb +2 -0
- data/lib/ftpd/list_path.rb +2 -0
- data/lib/ftpd/null_logger.rb +2 -0
- data/lib/ftpd/protocols.rb +2 -0
- data/lib/ftpd/read_only_disk_file_system.rb +2 -0
- data/lib/ftpd/server.rb +2 -0
- data/lib/ftpd/session.rb +7 -0
- data/lib/ftpd/session_config.rb +26 -2
- data/lib/ftpd/stream.rb +2 -0
- data/lib/ftpd/telnet.rb +3 -2
- data/lib/ftpd/temp_dir.rb +2 -0
- data/lib/ftpd/tls_server.rb +2 -0
- data/lib/ftpd/translate_exceptions.rb +2 -0
- data/spec/command_sequence_checker_spec.rb +2 -0
- data/spec/connection_throttle_spec.rb +2 -0
- data/spec/connection_tracker_spec.rb +2 -0
- data/spec/data_server_factory_spec.rb +104 -0
- data/spec/disk_file_system_spec.rb +2 -0
- data/spec/exception_translator_spec.rb +2 -0
- data/spec/file_info_spec.rb +2 -0
- data/spec/ftp_server_error_spec.rb +2 -0
- data/spec/list_format/eplf_spec.rb +2 -0
- data/spec/list_format/ls_spec.rb +2 -0
- data/spec/list_path_spec.rb +2 -0
- data/spec/null_logger_spec.rb +2 -0
- data/spec/protocols_spec.rb +58 -38
- data/spec/server_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/telnet_spec.rb +2 -0
- data/spec/translate_exceptions_spec.rb +2 -0
- data/testlib/network.rb +17 -0
- metadata +13 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: da62814ce49fab3ad30c35b6841810728722bc99
|
|
4
|
+
data.tar.gz: fd68f590b35708037f0ca1678dd84936dee7d4e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a84a4a7d0554c71e71816376b7cac3268d0f6250a58d34ffa0a9bc1f5116468b73e36c5f09a333f28b173cf9c4dd9e7427ac5c9f9cb93cf12f63344ae7bfd09e
|
|
7
|
+
data.tar.gz: ffd9e7e5477c2afd9301158be878968ed7e601677433f5c8e2b0dfee050106f580026235368a726e05a84da0f92a25369de649ddf19a1fa03ff8b2e7d591ce98
|
data/.travis.yml
CHANGED
data/Changelog.md
CHANGED
|
@@ -2,6 +2,21 @@ This is the change log for the main branch of ftpd, which supports
|
|
|
2
2
|
Ruby 1.9 and greater. For ruby 1.8.7, please use the latest version
|
|
3
3
|
before 0.8.0.
|
|
4
4
|
|
|
5
|
+
### Development
|
|
6
|
+
|
|
7
|
+
Breaking changes:
|
|
8
|
+
|
|
9
|
+
* Freeze strings by default. This is an unlikely but potential
|
|
10
|
+
breaking change for users of Ruby >= 2.3.
|
|
11
|
+
|
|
12
|
+
Non-breaking changes
|
|
13
|
+
|
|
14
|
+
* Added option #nat_ip to configure the advertised IP for passive mode
|
|
15
|
+
connections.
|
|
16
|
+
|
|
17
|
+
* Added option #passive_ports to configure the port range for passive
|
|
18
|
+
mode server sockets.
|
|
19
|
+
|
|
5
20
|
### 1.1.1 (2014-11-22)
|
|
6
21
|
|
|
7
22
|
Administration
|
data/Gemfile
CHANGED
|
@@ -3,10 +3,10 @@ source 'http://rubygems.org'
|
|
|
3
3
|
gem 'memoizer', '~> 1.0'
|
|
4
4
|
|
|
5
5
|
group :development do
|
|
6
|
-
gem 'cucumber', '~>
|
|
6
|
+
gem 'cucumber', '~> 2.0'
|
|
7
7
|
gem 'double-bag-ftps', '~> 0.1'
|
|
8
8
|
gem 'jeweler', '~> 2.0'
|
|
9
|
-
gem 'rake', '~>
|
|
9
|
+
gem 'rake', '~> 11.1'
|
|
10
10
|
gem 'redcarpet', '~> 3.1'
|
|
11
11
|
gem 'rspec', '~> 3.1'
|
|
12
12
|
gem 'rspec-its', '~> 1.0'
|
data/Gemfile.lock
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: http://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
addressable (2.
|
|
4
|
+
addressable (2.4.0)
|
|
5
5
|
builder (3.2.2)
|
|
6
|
-
cucumber (
|
|
6
|
+
cucumber (2.3.3)
|
|
7
7
|
builder (>= 2.1.2)
|
|
8
|
+
cucumber-core (~> 1.4.0)
|
|
9
|
+
cucumber-wire (~> 0.0.1)
|
|
8
10
|
diff-lcs (>= 1.1.3)
|
|
9
|
-
gherkin (~> 2.
|
|
11
|
+
gherkin (~> 3.2.0)
|
|
10
12
|
multi_json (>= 1.7.5, < 2.0)
|
|
11
|
-
multi_test (>= 0.1.
|
|
13
|
+
multi_test (>= 0.1.2)
|
|
14
|
+
cucumber-core (1.4.0)
|
|
15
|
+
gherkin (~> 3.2.0)
|
|
16
|
+
cucumber-wire (0.0.1)
|
|
12
17
|
descendants_tracker (0.0.4)
|
|
13
18
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
14
19
|
diff-lcs (1.2.5)
|
|
15
20
|
double-bag-ftps (0.1.2)
|
|
16
|
-
faraday (0.9.
|
|
21
|
+
faraday (0.9.2)
|
|
17
22
|
multipart-post (>= 1.2, < 3)
|
|
18
|
-
gherkin (2.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
addressable (~> 2.3)
|
|
23
|
+
gherkin (3.2.0)
|
|
24
|
+
git (1.3.0)
|
|
25
|
+
github_api (0.13.1)
|
|
26
|
+
addressable (~> 2.4.0)
|
|
23
27
|
descendants_tracker (~> 0.0.4)
|
|
24
28
|
faraday (~> 0.8, < 0.10)
|
|
25
|
-
hashie (>= 3.
|
|
29
|
+
hashie (>= 3.4)
|
|
26
30
|
multi_json (>= 1.7.5, < 2.0)
|
|
27
|
-
nokogiri (~> 1.6.3)
|
|
28
31
|
oauth2
|
|
29
|
-
hashie (3.3
|
|
30
|
-
highline (1.
|
|
31
|
-
jeweler (2.
|
|
32
|
+
hashie (3.4.3)
|
|
33
|
+
highline (1.7.8)
|
|
34
|
+
jeweler (2.1.1)
|
|
32
35
|
builder
|
|
33
36
|
bundler (>= 1.0)
|
|
34
37
|
git (>= 1.2.5)
|
|
@@ -37,57 +40,63 @@ GEM
|
|
|
37
40
|
nokogiri (>= 1.5.10)
|
|
38
41
|
rake
|
|
39
42
|
rdoc
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
semver
|
|
44
|
+
json (1.8.3)
|
|
45
|
+
jwt (1.5.1)
|
|
42
46
|
memoizer (1.0.1)
|
|
43
|
-
|
|
44
|
-
multi_json (1.
|
|
45
|
-
multi_test (0.1.
|
|
47
|
+
mini_portile2 (2.0.0)
|
|
48
|
+
multi_json (1.11.2)
|
|
49
|
+
multi_test (0.1.2)
|
|
46
50
|
multi_xml (0.5.5)
|
|
47
51
|
multipart-post (2.0.0)
|
|
48
|
-
nokogiri (1.6.
|
|
49
|
-
|
|
50
|
-
oauth2 (1.
|
|
52
|
+
nokogiri (1.6.7.2)
|
|
53
|
+
mini_portile2 (~> 2.0.0.rc2)
|
|
54
|
+
oauth2 (1.1.0)
|
|
51
55
|
faraday (>= 0.8, < 0.10)
|
|
52
|
-
jwt (~> 1.0)
|
|
56
|
+
jwt (~> 1.0, < 1.5.2)
|
|
53
57
|
multi_json (~> 1.3)
|
|
54
58
|
multi_xml (~> 0.5)
|
|
55
|
-
rack (
|
|
56
|
-
rack (1.
|
|
57
|
-
rake (
|
|
58
|
-
rdoc (4.
|
|
59
|
+
rack (>= 1.2, < 3)
|
|
60
|
+
rack (1.6.4)
|
|
61
|
+
rake (11.1.2)
|
|
62
|
+
rdoc (4.2.2)
|
|
59
63
|
json (~> 1.4)
|
|
60
|
-
redcarpet (3.
|
|
61
|
-
rspec (3.
|
|
62
|
-
rspec-core (~> 3.
|
|
63
|
-
rspec-expectations (~> 3.
|
|
64
|
-
rspec-mocks (~> 3.
|
|
65
|
-
rspec-core (3.
|
|
66
|
-
rspec-support (~> 3.
|
|
67
|
-
rspec-expectations (3.
|
|
64
|
+
redcarpet (3.3.4)
|
|
65
|
+
rspec (3.4.0)
|
|
66
|
+
rspec-core (~> 3.4.0)
|
|
67
|
+
rspec-expectations (~> 3.4.0)
|
|
68
|
+
rspec-mocks (~> 3.4.0)
|
|
69
|
+
rspec-core (3.4.4)
|
|
70
|
+
rspec-support (~> 3.4.0)
|
|
71
|
+
rspec-expectations (3.4.0)
|
|
72
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
73
|
+
rspec-support (~> 3.4.0)
|
|
74
|
+
rspec-its (1.2.0)
|
|
75
|
+
rspec-core (>= 3.0.0)
|
|
76
|
+
rspec-expectations (>= 3.0.0)
|
|
77
|
+
rspec-mocks (3.4.1)
|
|
68
78
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
69
|
-
rspec-support (~> 3.
|
|
70
|
-
rspec-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
rspec-support (3.1.1)
|
|
76
|
-
thread_safe (0.3.4)
|
|
77
|
-
timecop (0.7.1)
|
|
78
|
-
yard (0.8.7.4)
|
|
79
|
+
rspec-support (~> 3.4.0)
|
|
80
|
+
rspec-support (3.4.1)
|
|
81
|
+
semver (1.0.1)
|
|
82
|
+
thread_safe (0.3.5)
|
|
83
|
+
timecop (0.8.1)
|
|
84
|
+
yard (0.8.7.6)
|
|
79
85
|
|
|
80
86
|
PLATFORMS
|
|
81
87
|
ruby
|
|
82
88
|
|
|
83
89
|
DEPENDENCIES
|
|
84
|
-
cucumber (~>
|
|
90
|
+
cucumber (~> 2.0)
|
|
85
91
|
double-bag-ftps (~> 0.1)
|
|
86
92
|
jeweler (~> 2.0)
|
|
87
93
|
memoizer (~> 1.0)
|
|
88
|
-
rake (~>
|
|
94
|
+
rake (~> 11.1)
|
|
89
95
|
redcarpet (~> 3.1)
|
|
90
96
|
rspec (~> 3.1)
|
|
91
97
|
rspec-its (~> 1.0)
|
|
92
98
|
timecop (~> 0.7)
|
|
93
99
|
yard (~> 0.8.7)
|
|
100
|
+
|
|
101
|
+
BUNDLED WITH
|
|
102
|
+
1.11.2
|
data/README.md
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
[](https://travis-ci.org/wconrad/ftpd)
|
|
5
5
|
[](https://codeclimate.com/github/wconrad/ftpd)
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
ftpd is a pure Ruby FTP server library. It supports implicit and
|
|
9
8
|
explicit TLS, IPV6, passive and active mode, and is unconditionally
|
|
10
9
|
compliant per [RFC-1123][1]. It can be used as part of a test fixture
|
|
@@ -175,6 +174,8 @@ server.start
|
|
|
175
174
|
|
|
176
175
|
You can set any of these attributes before starting the server:
|
|
177
176
|
|
|
177
|
+
# {Ftpd::FtpServer#nat_ip}
|
|
178
|
+
# {Ftpd::FtpServer#passive_ports}
|
|
178
179
|
* {Ftpd::FtpServer#allow_low_data_ports}
|
|
179
180
|
* {Ftpd::FtpServer#auth_level}
|
|
180
181
|
* {Ftpd::FtpServer#exception_handler}
|
|
@@ -284,6 +285,12 @@ that branch, use this line in your Gemfile:
|
|
|
284
285
|
Does it work for you? Is it busted? Please report your experience
|
|
285
286
|
[here](https://github.com/wconrad/ftpd/issues/3).
|
|
286
287
|
|
|
288
|
+
## Versioning
|
|
289
|
+
|
|
290
|
+
This library uses [Semantic Versioning](http://semver.org/). Ftpd
|
|
291
|
+
promises not to make breaking changes to its API without bumping the
|
|
292
|
+
major version.
|
|
293
|
+
|
|
287
294
|
## Development
|
|
288
295
|
|
|
289
296
|
### Tests
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2.0.0
|
data/examples/example.rb
CHANGED
|
@@ -19,6 +19,8 @@ module Example
|
|
|
19
19
|
attr_reader :debug
|
|
20
20
|
attr_reader :eplf
|
|
21
21
|
attr_reader :interface
|
|
22
|
+
attr_reader :nat_ip
|
|
23
|
+
attr_reader :passive_ports
|
|
22
24
|
attr_reader :password
|
|
23
25
|
attr_reader :port
|
|
24
26
|
attr_reader :read_only
|
|
@@ -36,6 +38,8 @@ module Example
|
|
|
36
38
|
@account = ''
|
|
37
39
|
@session_timeout = default_session_timeout
|
|
38
40
|
@log = nil
|
|
41
|
+
@nat_ip = nil
|
|
42
|
+
@passive_ports = nil
|
|
39
43
|
op = option_parser
|
|
40
44
|
op.parse!(argv)
|
|
41
45
|
rescue OptionParser::ParseError => e
|
|
@@ -88,6 +92,12 @@ module Example
|
|
|
88
92
|
op.on('-d', '--debug', 'Write server debug log to stdout') do |t|
|
|
89
93
|
@debug = t
|
|
90
94
|
end
|
|
95
|
+
op.on('--nat-ip IP', 'Set advertised passive mode IP') do |t|
|
|
96
|
+
@nat_ip = t
|
|
97
|
+
end
|
|
98
|
+
op.on('--ports MIN..MAX', 'Port numbers for passive mode sockets') do |v|
|
|
99
|
+
@passive_ports = Range.new(*v.split(/\.\./).map(&:to_i))
|
|
100
|
+
end
|
|
91
101
|
end
|
|
92
102
|
end
|
|
93
103
|
|
|
@@ -181,6 +191,7 @@ module Example
|
|
|
181
191
|
@server.interface = @args.interface
|
|
182
192
|
@server.port = @args.port
|
|
183
193
|
@server.tls = @args.tls
|
|
194
|
+
@server.passive_ports = @args.passive_ports
|
|
184
195
|
@server.certfile_path = insecure_certfile_path
|
|
185
196
|
if @args.eplf
|
|
186
197
|
@server.list_formatter = Ftpd::ListFormat::Eplf
|
|
@@ -188,6 +199,7 @@ module Example
|
|
|
188
199
|
@server.auth_level = auth_level
|
|
189
200
|
@server.session_timeout = @args.session_timeout
|
|
190
201
|
@server.log = make_log
|
|
202
|
+
@server.nat_ip = @args.nat_ip
|
|
191
203
|
end
|
|
192
204
|
|
|
193
205
|
def auth_level
|
|
@@ -4,20 +4,27 @@ Feature: PASV
|
|
|
4
4
|
I want good error messages
|
|
5
5
|
So that I can correct problems
|
|
6
6
|
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
|
|
10
7
|
Scenario: No argument
|
|
8
|
+
Given the test server is started
|
|
11
9
|
Given a successful login
|
|
12
10
|
Then the client successfully sends "PASV"
|
|
13
11
|
|
|
14
12
|
Scenario: After "EPSV ALL"
|
|
13
|
+
Given the test server is started
|
|
15
14
|
Given a successful login
|
|
16
15
|
Given the client successfully sends "EPSV ALL"
|
|
17
16
|
When the client sends "PASV"
|
|
18
17
|
Then the server sends a not allowed after epsv all error
|
|
19
18
|
|
|
20
19
|
Scenario: Not logged in
|
|
20
|
+
Given the test server is started
|
|
21
21
|
Given a successful connection
|
|
22
22
|
When the client sends "EPSV"
|
|
23
23
|
Then the server returns a not logged in error
|
|
24
|
+
|
|
25
|
+
Scenario: Configured with NAT IP
|
|
26
|
+
Given the test server has a NAT IP of 10.1.2.3
|
|
27
|
+
Given the test server is started
|
|
28
|
+
And a successful login
|
|
29
|
+
When the client successfully sends "PASV"
|
|
30
|
+
Then the server advertises passive IP 10.1.2.3
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
def server
|
|
2
4
|
@server ||= TestServer.new
|
|
3
5
|
end
|
|
@@ -63,3 +65,7 @@ end
|
|
|
63
65
|
Given /^the test server has a failed login delay of (\S+) seconds$/ do |s|
|
|
64
66
|
server.failed_login_delay = s.to_f
|
|
65
67
|
end
|
|
68
|
+
|
|
69
|
+
Given /^the test server has a NAT IP of (\S+)$/ do |s|
|
|
70
|
+
server.nat_ip = s
|
|
71
|
+
end
|