Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsftp

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsftp - npm Package Compare versions

Comparing version 0.2.2 to 0.2.5

9

jsftp_test.js

@@ -141,6 +141,9 @@ /*

ftp.raw.cwd("/unexistentDir/", function(err, res) {
assert.ok(err);
if (err)
assert.ok(err);
else {
code = parseInt(res.code, 10);
assert.ok(code === 550, "A (wrong) CWD command was successful. It should have failed");
}
code = parseInt(res.code, 10);
assert.ok(code === 550, "A (wrong) CWD command was successful. It should have failed");
next();

@@ -147,0 +150,0 @@ });

@@ -104,3 +104,6 @@ /*

self.keepAlive();
if (lcCmd === "quit" && self._keepAliveInterval)
clearInterval(self._keepAliveInterval);
else
self.keepAlive();

@@ -342,2 +345,3 @@ // Check whether the FTP user is authenticated at the moment of the

var callback = command[1];
var err;

@@ -348,4 +352,9 @@ if (callback) {

// overgeneralize and consider every value above 399 as an error.
var hasFailed = ftpResponse && ftpResponse.code > 399;
callback(hasFailed && (ftpResponse.text || "Unknown FTP error."), ftpResponse);
if (ftpResponse && ftpResponse.code > 399) {
err = new Error(ftpResponse.text || "Unknown FTP error.")
err.code = ftpResponse.code;
callback(err);
} else {
callback(null, ftpResponse);
}
}

@@ -455,7 +464,7 @@ this.nextCmd();

self.raw.user(user, function(err, res) {
if ([230, 331, 332].indexOf(res.code) > -1) {
if (!err && [230, 331, 332].indexOf(res.code) > -1) {
self.raw.pass(pass, function(err, res) {
self.authenticating = false;
if ([230, 202].indexOf(res.code) > -1) {
if (!err && [230, 202].indexOf(res.code) > -1) {
self.authenticated = true;

@@ -471,3 +480,3 @@ self.user = user;

}
else if (res.code === 332) {
else if (!err && res.code === 332) {
self.raw.acct(""); // ACCT not really supported

@@ -474,0 +483,0 @@ }

@@ -46,3 +46,3 @@ /**

// or time (for numeric or recent standard format)
+ "(\\d+(?::\\d+)?)\\s+"
+ "(\\d+(?::\\d+)?)\\s*"

@@ -60,3 +60,3 @@ //+ "(\\S*)(\\s*.*)"

+ "(<DIR>)?\\s*"
+ "([0-9]+)?\\s+"
+ "([0-9]+)?\\s*"
+ "(\\S.*)"

@@ -63,0 +63,0 @@ );

{
"name": "jsftp",
"id": "jsftp",
"version": "0.2.2",
"version": "0.2.5",
"description": "A sane FTP client implementation for NodeJS",

@@ -6,0 +6,0 @@ "keywords": [ "ftp", "streams", "files", "server", "client", "async" ],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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