basic-ftp
Advanced tools
+0
-4
@@ -678,6 +678,2 @@ "use strict"; | ||
| async protectWhitespace(path) { | ||
| // Reject CRLF injection attempts | ||
| if (/[\r\n\0]/.test(path)) { | ||
| throw new Error("Invalid path: Contains control characters"); | ||
| } | ||
| if (!path.startsWith(" ")) { | ||
@@ -684,0 +680,0 @@ return path; |
@@ -178,2 +178,6 @@ "use strict"; | ||
| send(command) { | ||
| // Reject control character injection attempts. | ||
| if (/[\r\n\0]/.test(command)) { | ||
| throw new Error(`Invalid command: Contains control characters. (${command})`); | ||
| } | ||
| const containsPassword = command.startsWith("PASS"); | ||
@@ -180,0 +184,0 @@ const message = containsPassword ? "> PASS ###" : `> ${command}`; |
+1
-1
| { | ||
| "name": "basic-ftp", | ||
| "version": "5.2.1", | ||
| "version": "5.2.2", | ||
| "description": "FTP client for Node.js, supports FTPS over TLS, IPv6, Async/Await, and Typescript.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
138151
0.02%