Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

ssh2

Package Overview
Dependencies
1
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.10 to 0.2.11

29

lib/keyParser.js

@@ -6,3 +6,3 @@ // TODO: handle multi-line header values

RE_FOOTER_OPENSSH_PRIV = /^-----END (?:RSA|DSA) PRIVATE KEY-----$/i,
RE_HEADER_OPENSSH_PUB = /^ssh-(rsa|dss) ([A-Z0-9a-z\/+=]+(?:$|\s+([\S].*)?)$)/i,
RE_HEADER_OPENSSH_PUB = /^(ssh-(rsa|dss)(?:-cert-v0[01]@openssh.com)?) ([A-Z0-9a-z\/+=]+(?:$|\s+([\S].*)?)$)/i,
RE_HEADER_RFC4176_PUB = /^---- BEGIN SSH2 PUBLIC KEY ----$/i,

@@ -19,2 +19,3 @@ RE_FOOTER_RFC4176_PUB = /^---- END SSH2 PUBLIC KEY ----$/i,

var ret = {
fulltype: undefined,
type: undefined,

@@ -94,6 +95,7 @@ extra: undefined,

// OpenSSH public key
ret.type = m[1].toLowerCase();
ret.public = new Buffer(m[2], 'base64');
ret.fulltype = m[1];
ret.type = m[2].toLowerCase();
ret.public = new Buffer(m[3], 'base64');
ret.publicOrig = new Buffer(orig);
ret.comment = m[3];
ret.comment = m[4];
} else if ((m = RE_HEADER_RFC4176_PUB.exec(data[0]))

@@ -123,13 +125,10 @@ && RE_FOOTER_RFC4176_PUB.test(data[data.length - 1])) {

len = ret.public.readUInt32BE(0, true);
if (len !== 7)
var fulltype = ret.public.toString('ascii', 4, 4 + len);
ret.fulltype = fulltype;
if (fulltype === 'ssh-dss')
ret.type = 'dss';
else if (fulltype === 'ssh-rsa')
ret.type = 'rsa';
else
return false;
else {
var type = ret.public.toString('ascii', 4, 11);
if (type === 'ssh-dss')
ret.type = 'dss';
else if (type === 'ssh-rsa')
ret.type = 'rsa';
else
return false;
}
ret.public = ret.public.slice(11);

@@ -141,2 +140,2 @@ ret.publicOrig = new Buffer(orig);

return ret;
};
};

@@ -1700,3 +1700,2 @@ var EventEmitter = require('events').EventEmitter,

self.bytesWritten += arg1;
self.pos += arg1;
cb && cb(undefined, arg1);

@@ -1703,0 +1702,0 @@ } else if (method === self._sftp.open) {

{ "name": "ssh2",
"version": "0.2.10",
"version": "0.2.11",
"author": "Brian White <mscdex@mscdex.net>",

@@ -4,0 +4,0 @@ "description": "An SSH2 client module written in pure JavaScript for node.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc