Socket
Socket
Sign inDemoInstall

ftp

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ftp - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

68

ftp.js

@@ -273,6 +273,5 @@ var util = require('util'),

if (r) {
instream.pipe(outstream);
instream.resume();
instream.pipe(outstream);
}
else
} else
cb(new Error('Connection severed'));

@@ -478,3 +477,3 @@ });

}
if (this._queue.length) {
if (this._queue.length) {
var fullcmd = this._queue[0][0]

@@ -529,8 +528,8 @@ + (this._queue[0].length === 3 ? ' ' + this._queue[0][1] : '');

var r = self.send('ABOR', function(e) {
if (e)
return self._callCb(e);
self._dataSock.destroy();
self._dataSock = self._pasvPort = self._pasvIP = undefined;
self._callCb(new Error('(PASV) Data connection timed out while connecting'));
});
self._dataSock.end();
self._pasvPort = self._pasvIP = undefined;
if (e)
return self._callCb(e);
self._callCb(new Error('(PASV) Data connection timed out while connecting'));
});
if (!r)

@@ -544,25 +543,28 @@ self._callCb(new Error('Connection severed'));

this._dataSock = net.createConnection(this._pasvPort, this._pasvIP);
this._dataSock.on('connect', function() {
clearTimeout(pasvTimeout);
if (debug)
debug('(PASV) Data connection successful');
self._callCb(self._dataSock);
});
this._dataSock.on('end', function() {
if (debug)
debug('(PASV) Data connection closed');
self._dataSock = self._pasvPort = self._pasvIP = undefined;
});
this._dataSock.on('close', function() {
clearTimeout(pasvTimeout);
});
this._dataSock.on('error', function(err) {
if (debug)
debug('(PASV) Error: ' + err);
self._callCb(err);
self._dataSock = self._pasvPort = self._pasvIP = undefined;
});
if (!this._dataSock) {
this._dataSock = new net.Socket();
this._dataSock.on('connect', function() {
clearTimeout(pasvTimeout);
if (debug)
debug('(PASV) Data connection successful');
self._callCb(self._dataSock);
});
this._dataSock.on('end', function() {
if (debug)
debug('(PASV) Data connection closed');
self._pasvPort = self._pasvIP = undefined;
});
this._dataSock.on('close', function() {
clearTimeout(pasvTimeout);
});
this._dataSock.on('error', function(err) {
if (debug)
debug('(PASV) Error: ' + err);
self._pasvPort = self._pasvIP = undefined
self._callCb(err);
});
}
this._dataSock.connect(this._pasvPort, this._pasvIP);
return true;

@@ -726,3 +728,3 @@ };

function getGroup(code) {
return parseInt(code/10)%10;
return parseInt(code / 10) % 10;
}

@@ -729,0 +731,0 @@

{ "name": "ftp",
"version": "0.1.2",
"version": "0.1.3",
"author": "Brian White <mscdex@mscdex.net>",

@@ -4,0 +4,0 @@ "description": "An FTP client module for node.js",

@@ -20,3 +20,3 @@ Description

* Get a directory listing of the current working directory:
* Get a pretty-printed directory listing of the current (remote) working directory:

@@ -23,0 +23,0 @@ var FTPClient = require('./ftp'), util = require('util'), conn;

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