diff --git a/THIRD-PARTY b/THIRD-PARTY index f6472cc..2e0ad0e 100644 --- a/THIRD-PARTY +++ b/THIRD-PARTY @@ -2665,7 +2665,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following npm package may be included in this product: - - basic-ftp@5.2.1 + - basic-ftp@5.2.2 This package contains the following license: diff --git a/dist/index.js b/dist/index.js index a386cbb..cb71083 100644 --- a/dist/index.js +++ b/dist/index.js @@ -50252,6 +50252,9 @@ var require_FtpContext = __commonJS({ * Send an FTP command without waiting for or handling the result. */ send(command) { + if (/[\r\n\0]/.test(command)) { + throw new Error(`Invalid command: Contains control characters. (${command})`); + } const containsPassword = command.startsWith("PASS"); const message = containsPassword ? "> PASS ###" : `> ${command}`; this.log(message); @@ -51890,9 +51893,6 @@ var require_Client = __commonJS({ * a given path to fix that issue for most cases. */ async protectWhitespace(path3) { - if (/[\r\n\0]/.test(path3)) { - throw new Error("Invalid path: Contains control characters"); - } if (!path3.startsWith(" ")) { return path3; }