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.3.5 to 0.3.6

7

lib/connection.js

@@ -15,4 +15,3 @@ var fs = require('fs'),

RE_EOL = /\r?\n/g,
RE_CWD = /"(.+)"(?: |$)/,
RE_PWD = /^"(.+)"(?: |$)/,
RE_WD = /"(.+)"(?: |$)/,
RE_SYST = /^([^ ]+)(?: |$)/;

@@ -348,3 +347,3 @@

return cb(err);
var m = RE_CWD.exec(text);
var m = RE_WD.exec(text);
cb(undefined, m ? m[1] : undefined);

@@ -644,3 +643,3 @@ }, promote);

return cb(err);
cb(undefined, RE_PWD.exec(text)[1]);
cb(undefined, RE_WD.exec(text)[1]);
});

@@ -647,0 +646,0 @@ };

@@ -111,4 +111,43 @@ var WritableStream = require('stream').Writable

mins = '0' + mins;
info.date = new Date(year + '-' + month + '-' + day + 'T'
+ hour + ':' + mins);
info.date = new Date(year + '-'
+ month + '-'
+ day + 'T'
+ hour + ':'
+ mins);
// If the date is in the past but no more than 6 months old, year
// isn't displayed and doesn't have to be the current year.
//
// If the date is in the future (less than an hour from now), year
// isn't displayed and doesn't have to be the current year.
// That second case is much more rare than the first and less annoying.
// It's impossible to fix without knowing about the server's timezone,
// so we just don't do anything about it.
//
// If we're here with a time that is more than 28 hours into the
// future (1 hour + maximum timezone offset which is 27 hours),
// there is a problem -- we should be in the second conditional block
if (info.date.getTime() - Date.now() > 100800000) {
info.date = new Date((year - 1) + '-'
+ month + '-'
+ day + 'T'
+ hour + ':'
+ mins);
}
// If we're here with a time that is more than 6 months old, there's
// a problem as well.
// Maybe local & remote servers aren't on the same timezone (with remote
// ahead of local)
// For instance, remote is in 2014 while local is still in 2013. In
// this case, a date like 01/01/13 02:23 could be detected instead of
// 01/01/14 02:23
// Our trigger point will be 3600*24*31*6 (since we already use 31
// as an upper bound, no need to add the 27 hours timezone offset)
if (Date.now() - info.date.getTime() > 16070400000) {
info.date = new Date((year + 1) + '-'
+ month + '-'
+ day + 'T'
+ hour + ':'
+ mins);
}
} else if (ret.month2 !== undefined) {

@@ -115,0 +154,0 @@ month = parseInt(MONTHS[ret.month2.toLowerCase()], 10);

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

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

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