From 025bebfa5602e1837fae906a095f3511e699ef58 Mon Sep 17 00:00:00 2001 From: Patrick Juchli Date: Tue, 17 Jan 2017 09:45:36 +0100 Subject: [PATCH] Support return code 200 for authentication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VxWorks FTP Server is used in many embedded devices and returns 200 (not 234) when accepting authentication using “AUTH TLS” or “AUTH SSL”. --- lib/connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/connection.js b/lib/connection.js index 606de14..ad0f556 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -247,7 +247,7 @@ FTP.prototype.connect = function(options) { cmd = 'USER'; self._send('USER ' + self.options.user, reentry, true); } else if (cmd.substr(0, 4) === 'AUTH') { - if (cmd === 'AUTH TLS' && code !== 234) { + if (cmd === 'AUTH TLS' && code !== 234 && code !== 200) { cmd = 'AUTH SSL'; return self._send(cmd, reentry, true); } else if (cmd === 'AUTH TLS')