Socket
Socket
Sign inDemoInstall

node-ssh

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ssh - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

7

Dist/SSH.js

@@ -16,2 +16,3 @@ 'use strict';

var Path = require('path');
var Escape = require('shell-escape');

@@ -23,4 +24,2 @@ var access = (0, _jsToolkit.promisify)(FS.access);

// TODO: Escape cwd
var SSH = (function () {

@@ -93,3 +92,3 @@ function SSH() {

options.stream = validStreams.has(options.stream) ? options.stream : 'stdout';
return this.execCommand([filePath].concat(args).join(' '), options).then(function (_ref) {
return this.execCommand([filePath].concat(Escape(args)).join(' '), options).then(function (_ref) {
var stdout = _ref.stdout;

@@ -131,3 +130,3 @@ var stderr = _ref.stderr;

if (options.cwd) {
command = 'cd ' + options.cwd + ' ; ' + command;
command = 'cd ' + Escape([options.cwd]) + ' ; ' + command;
}

@@ -134,0 +133,0 @@ return new Promise(function (resolve, reject) {

{
"name": "node-ssh",
"version": "2.0.6",
"version": "2.0.7",
"description": "SS2 with Promises",

@@ -25,4 +25,5 @@ "main": "Dist/SSH.js",

"js-toolkit": "0.0.5",
"shell-escape": "^0.2.0",
"ssh2": "^0.4.11"
}
}

@@ -9,2 +9,3 @@ // @Compiler-Transpile "true"

const Path = require('path')
const Escape = require('shell-escape')

@@ -16,4 +17,2 @@ const access = promisify(FS.access)

// TODO: Escape cwd
export default class SSH {

@@ -72,3 +71,3 @@ constructor() {

options.stream = validStreams.has(options.stream) ? options.stream : 'stdout'
return this.execCommand([filePath].concat(args).join(' '), options).then(({stdout, stderr, code, signal}) => {
return this.execCommand([filePath].concat(Escape(args)).join(' '), options).then(({stdout, stderr, code, signal}) => {
if (options.stream === 'both') {

@@ -99,3 +98,3 @@ return {stderr, stdout, code, signal}

if (options.cwd) {
command = 'cd ' + options.cwd + ' ; ' + command
command = 'cd ' + Escape([options.cwd]) + ' ; ' + command
}

@@ -158,3 +157,3 @@ return new Promise((resolve, reject) => {

const Promises = []
files.forEach((file) => {
files.forEach(file => {
Promises.push(this.put(file.Local, file.Remote, SFTP))

@@ -161,0 +160,0 @@ })

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc