net-ssh-backports 6.3.3.backports → 6.3.4.backports

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 918c2ff0c3480a29680cb420ff7c17f3c09c1dfd77e825602fd2ed3cbe5d1eac
4
- data.tar.gz: 56d4d76d1c08be13634ff811989ca3826acade09a1fe99910e3ff55f93557916
3
+ metadata.gz: c4b789946bcf65642f7c7bfcfca48f1a01900826fc934d30a3e5626f67d484d6
4
+ data.tar.gz: 8f7282bb62e397fe3bc348a04936c8384481fba3fbd3378983402fee654aa14e
5
5
  SHA512:
6
- metadata.gz: 6f6d6b0478fc004842a2cb1c1d18d7ed8680884d6fe8fec4aa5960d5c1d2fe1490678b67a4798e4832a8143cc4de01cbc41c1a3edd66eb5ac8901c4ba7fea11a
7
- data.tar.gz: 74b7797a3a061f980ce70ad183ed15670b101c1708fa6456d23d0418e02d759d78669d8c7fd4e768fdf935e251b36f9ca0877dacc712c0340179672f53673ff7
6
+ metadata.gz: 8eee9be83f4313adb451351c7b353f163c635d837e2f327ca400647317a3d3d5b2a1f76ddb123718c8fba029e1f5a196ee93dfd7aef23ba8e11ed8e159d5e4b9
7
+ data.tar.gz: 67af2e5b3f775c55686ca7ed8aa353a1df2a01b1ce29c1ae5dc87a046a9d45d8f977a5d884333607d30b0da09228fc629c8c1d2d677e008085aeea9dfa37e074
@@ -55,35 +55,38 @@ module Net
55
55
  # service request. Returns true if an authentication method succeeds in
56
56
  # authenticating the user, and false otherwise.
57
57
  def authenticate(next_service, username, password=nil)
58
- debug { "beginning authentication of `#{username}'" }
58
+ begin
59
+ debug { "beginning authentication of `#{username}'" }
59
60
 
60
- transport.send_message(transport.service_request("ssh-userauth"))
61
- expect_message(SERVICE_ACCEPT)
61
+ transport.send_message(transport.service_request("ssh-userauth"))
62
+ expect_message(SERVICE_ACCEPT)
62
63
 
63
- key_manager = KeyManager.new(logger, options)
64
- keys.each { |key| key_manager.add(key) } unless keys.empty?
65
- keycerts.each { |keycert| key_manager.add_keycert(keycert) } unless keycerts.empty?
66
- key_data.each { |key2| key_manager.add_key_data(key2) } unless key_data.empty?
67
- default_keys.each { |key| key_manager.add(key) } unless options.key?(:keys) || options.key?(:key_data)
64
+ key_manager = KeyManager.new(logger, options)
65
+ keys.each { |key| key_manager.add(key) } unless keys.empty?
66
+ keycerts.each { |keycert| key_manager.add_keycert(keycert) } unless keycerts.empty?
67
+ key_data.each { |key2| key_manager.add_key_data(key2) } unless key_data.empty?
68
+ default_keys.each { |key| key_manager.add(key) } unless options.key?(:keys) || options.key?(:key_data)
68
69
 
69
- attempted = []
70
+ attempted = []
70
71
 
71
- @auth_methods.each do |name|
72
- next unless @allowed_auth_methods.include?(name)
72
+ @auth_methods.each do |name|
73
+ next unless @allowed_auth_methods.include?(name)
73
74
 
74
- attempted << name
75
+ attempted << name
75
76
 
76
- debug { "trying #{name}" }
77
- begin
78
- auth_class = Methods.const_get(name.split(/\W+/).map { |p| p.capitalize }.join)
79
- method = auth_class.new(self, key_manager: key_manager, password_prompt: options[:password_prompt])
80
- rescue NameError
81
- debug {"Mechanism #{name} was requested, but isn't a known type. Ignoring it."}
82
- next
83
- end
77
+ debug { "trying #{name}" }
78
+ begin
79
+ auth_class = Methods.const_get(name.split(/\W+/).map { |p| p.capitalize }.join)
80
+ method = auth_class.new(self, key_manager: key_manager, password_prompt: options[:password_prompt])
81
+ rescue NameError
82
+ debug {"Mechanism #{name} was requested, but isn't a known type. Ignoring it."}
83
+ next
84
+ end
84
85
 
85
- return true if method.authenticate(next_service, username, password)
86
- rescue Net::SSH::Authentication::DisallowedMethod
86
+ return true if method.authenticate(next_service, username, password)
87
+ rescue Net::SSH::Authentication::DisallowedMethod => e
88
+ raise e
89
+ end
87
90
  end
88
91
 
89
92
  error { "all authorization methods failed (tried #{attempted.join(', ')})" }
@@ -52,7 +52,7 @@ module Net
52
52
  MINOR = 3
53
53
 
54
54
  # The tiny component of this version of the Net::SSH library
55
- TINY = 3
55
+ TINY = 4
56
56
 
57
57
  # The prerelease component of this version of the Net::SSH library
58
58
  # nil allowed
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh-backports
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.3.3.backports
4
+ version: 6.3.4.backports
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck