We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 515d21f commit 2ecc8e2Copy full SHA for 2ecc8e2
src/Client.ts
@@ -760,6 +760,10 @@ export class Client {
760
* a given path to fix that issue for most cases.
761
*/
762
async protectWhitespace(path: string): Promise<string> {
763
+ // Reject CRLF injection attempts
764
+ if (/[\r\n\0]/.test(path)) {
765
+ throw new Error("Invalid path: Contains control characters");
766
+ }
767
if (!path.startsWith(" ")) {
768
return path
769
}
0 commit comments