net-ssh 7.3.6 → 7.3.8
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
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/ci.yml +1 -1
- data/CHANGES.txt +8 -0
- data/Rakefile +20 -12
- data/lib/net/ssh/proxy/jump.rb +27 -6
- data/lib/net/ssh/transport/session.rb +2 -1
- data/lib/net/ssh/version.rb +1 -1
- data/net-ssh.gemspec +2 -0
- data.tar.gz.sig +0 -0
- metadata +16 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a32034e7f363bc87196ff8a13b8c79bd7e9b246e98375c8e8d505cd52ea0b19a
|
|
4
|
+
data.tar.gz: d98d516fa2ddc9a8e2718e60ea4367da99ae49b5082ec0b4897db24cc86a625f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d5d09d26af82a639bb793453e27f95b89cb1dbcc15a2bd22ccad8bc7e7106d848008927dbee29b5a8f7c280a15a5bd9eced464c45f004f0c1b64ee2bb1bb8eee
|
|
7
|
+
data.tar.gz: 5b97d998e035e0c3a499ae89168f10b7e484cbf87ef551d16a11ddef1cf9d1f729b26a204d9cdabb7e1ea7b99de0e4322d9e71cba384c3d47ac0db85ccc2b8ac
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/.github/workflows/ci.yml
CHANGED
data/CHANGES.txt
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
=== 7.3.8
|
|
2
|
+
|
|
3
|
+
* Security: validate every ProxyJump hop, not only the first, as [user@]host[:port] (refusing a path, query, fragment or password) and shell-escape the hops passed to ssh -J; a hop such as `evil/x&$(cmd)` ran `cmd` through the shell [GHSA-g2r2-x3p2-5677]
|
|
4
|
+
|
|
5
|
+
=== 7.3.7
|
|
6
|
+
|
|
7
|
+
* Fixed `unexpected packet type 94 during initial key exchange` (or 93) when channel data arrives during a client-initiated re-key, which broke bulk transfers at the first re-key (e.g. with `rekey_limit`, or after about 1 GB); a regression in 7.3.5 [#1063]
|
|
8
|
+
|
|
1
9
|
=== 7.3.6
|
|
2
10
|
|
|
3
11
|
* Fix "Calling Net::SSH::Buffer methods on HostKeyEntries PubKey is deprecated" warnings printed on every connection to a host in known_hosts since 7.3.4 [#1026, #1028]
|
data/Rakefile
CHANGED
|
@@ -9,7 +9,13 @@ require "rake"
|
|
|
9
9
|
require "rake/clean"
|
|
10
10
|
require "bundler/gem_tasks"
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
# rdoc is no longer a default gem as of Ruby 4.0; keep the rest of the
|
|
13
|
+
# Rakefile usable when it is not installed.
|
|
14
|
+
begin
|
|
15
|
+
require "rdoc/task"
|
|
16
|
+
rescue LoadError
|
|
17
|
+
# rdoc tasks are optional
|
|
18
|
+
end
|
|
13
19
|
|
|
14
20
|
desc "When releasing make sure NET_SSH_BUILDGEM_SIGNED is set"
|
|
15
21
|
task :check_NET_SSH_BUILDGEM_SIGNED do
|
|
@@ -27,17 +33,19 @@ require_relative "lib/net/ssh/version"
|
|
|
27
33
|
version = Net::SSH::Version::CURRENT
|
|
28
34
|
|
|
29
35
|
extra_files = %w[LICENSE.txt THANKS.txt CHANGES.txt]
|
|
30
|
-
RDoc::Task
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if defined?(RDoc::Task)
|
|
37
|
+
RDoc::Task.new do |rdoc|
|
|
38
|
+
rdoc.rdoc_dir = "rdoc"
|
|
39
|
+
rdoc.title = "#{name} #{version}"
|
|
40
|
+
rdoc.generator = 'hanna' # gem install hanna-nouveau
|
|
41
|
+
rdoc.main = 'README.md'
|
|
42
|
+
rdoc.rdoc_files.include("README*")
|
|
43
|
+
rdoc.rdoc_files.include("bin/*.rb")
|
|
44
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
|
45
|
+
extra_files.each { |file|
|
|
46
|
+
rdoc.rdoc_files.include(file) if File.exist?(file)
|
|
47
|
+
}
|
|
48
|
+
end
|
|
41
49
|
end
|
|
42
50
|
|
|
43
51
|
namespace :cert do
|
data/lib/net/ssh/proxy/jump.rb
CHANGED
|
@@ -35,28 +35,49 @@ module Net
|
|
|
35
35
|
# We cannot build the ProxyCommand template until we know if the :config
|
|
36
36
|
# option was specified during `Net::SSH.start`.
|
|
37
37
|
def build_proxy_command_equivalent(connection_options = nil)
|
|
38
|
-
|
|
38
|
+
raise ArgumentError, "no jump host given" if jump_proxies.empty?
|
|
39
|
+
|
|
39
40
|
config = connection_options && connection_options[:config]
|
|
40
|
-
uri, = jump_proxies.split(",").map { |jump| validate_jump!(jump) }
|
|
41
|
+
uri, *extra_jumps = jump_proxies.split(",", -1).map { |jump| validate_jump!(jump) }
|
|
41
42
|
|
|
42
43
|
template = "ssh".dup
|
|
43
|
-
template << " -l #{uri.user}"
|
|
44
|
-
template << " -p #{uri.port}"
|
|
45
|
-
template << " -J #{extra_jumps}"
|
|
44
|
+
template << " -l #{escape(uri.user)}" if uri.user
|
|
45
|
+
template << " -p #{uri.port}" if uri.port
|
|
46
|
+
template << " -J #{escape(extra_jumps.map { |jump| jump_spec(jump) }.join(','))}" unless extra_jumps.empty?
|
|
46
47
|
template << " -F #{Shellwords.escape(config)}" if config != true && config
|
|
47
48
|
template << " -W %h:%p "
|
|
48
|
-
template << uri.host
|
|
49
|
+
template << escape(uri.host)
|
|
49
50
|
|
|
50
51
|
@command_line_template = template
|
|
51
52
|
end
|
|
52
53
|
|
|
53
54
|
private
|
|
54
55
|
|
|
56
|
+
# Escape for the shell, and double any % so it survives the %h/%p
|
|
57
|
+
# substitution done on the template in Command#open.
|
|
58
|
+
def escape(value)
|
|
59
|
+
Shellwords.escape(value).gsub("%", "%%")
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Only [user@]host[:port] is checked, so anything else URI accepts (a path,
|
|
63
|
+
# query, fragment or password) must be refused before it reaches the shell.
|
|
55
64
|
def validate_jump!(jump)
|
|
56
65
|
uri = URI.parse("ssh://#{jump}")
|
|
66
|
+
raise URI::InvalidURIError if uri.host.to_s.empty? || jump_spec(uri) != jump
|
|
67
|
+
|
|
57
68
|
validate_user_name!(uri.user) if uri.user
|
|
58
69
|
validate_host_name!(uri.host)
|
|
70
|
+
validate_port!(uri.port) if uri.port
|
|
59
71
|
uri
|
|
72
|
+
rescue URI::InvalidURIError
|
|
73
|
+
raise ArgumentError, "jump host is not [user@]host[:port]: #{jump.inspect}"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def jump_spec(uri)
|
|
77
|
+
spec = uri.host.dup
|
|
78
|
+
spec.prepend("#{uri.user}@") if uri.user
|
|
79
|
+
spec << ":#{uri.port}" if uri.port
|
|
80
|
+
spec
|
|
60
81
|
end
|
|
61
82
|
end
|
|
62
83
|
end
|
|
@@ -216,7 +216,8 @@ module Net
|
|
|
216
216
|
|
|
217
217
|
else
|
|
218
218
|
return packet if algorithms.allow?(packet)
|
|
219
|
-
|
|
219
|
+
# Algorithms#rekey! clears initialized?, so the session id is what marks the first key exchange as done.
|
|
220
|
+
raise Net::SSH::Exception, "unexpected packet type #{packet.type} during initial key exchange" unless algorithms.session_id
|
|
220
221
|
|
|
221
222
|
push(packet)
|
|
222
223
|
end
|
data/lib/net/ssh/version.rb
CHANGED
data/net-ssh.gemspec
CHANGED
|
@@ -30,6 +30,8 @@ Gem::Specification.new do |spec|
|
|
|
30
30
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
31
31
|
spec.require_paths = ["lib"]
|
|
32
32
|
|
|
33
|
+
spec.add_dependency("logger")
|
|
34
|
+
|
|
33
35
|
unless ENV['NET_SSH_NO_ED25519']
|
|
34
36
|
spec.add_development_dependency("bcrypt_pbkdf", "~> 1.0") unless RUBY_PLATFORM == "java"
|
|
35
37
|
spec.add_development_dependency("ed25519", "~> 1.2")
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: net-ssh
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.3.
|
|
4
|
+
version: 7.3.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jamis Buck
|
|
@@ -32,8 +32,22 @@ cert_chain:
|
|
|
32
32
|
ufHf4AX2UIkJbh7zCPkiNCqIr7MSWLNFG/9lOlHYsEJM8XujT1ofPobYx6YSFx/C
|
|
33
33
|
7HBrI7UX7awt6UvBZebhcHzyMHxg/B5PVQllPA==
|
|
34
34
|
-----END CERTIFICATE-----
|
|
35
|
-
date: 2026-10-
|
|
35
|
+
date: 2026-10-25 00:00:00.000000000 Z
|
|
36
36
|
dependencies:
|
|
37
|
+
- !ruby/object:Gem::Dependency
|
|
38
|
+
name: logger
|
|
39
|
+
requirement: !ruby/object:Gem::Requirement
|
|
40
|
+
requirements:
|
|
41
|
+
- - ">="
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: '0'
|
|
44
|
+
type: :runtime
|
|
45
|
+
prerelease: false
|
|
46
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
- - ">="
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: '0'
|
|
37
51
|
- !ruby/object:Gem::Dependency
|
|
38
52
|
name: bcrypt_pbkdf
|
|
39
53
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
|
Binary file
|