fix: curl parser url sanitisation (#2366)

This commit is contained in:
kyteinsky
2022-05-27 14:48:33 +05:30
committed by GitHub
parent b1a2c9e9d5
commit 83bdd03f43
6 changed files with 110 additions and 34 deletions

View File

@@ -19,10 +19,11 @@ const replaceables: { [key: string]: string } = {
const paperCuts = flow(
// remove '\' and newlines
S.replace(/ ?\\ ?$/gm, " "),
S.replace(/\n/g, ""),
S.replace(/\n/g, " "),
// remove all $ symbols from start of argument values
S.replace(/\$'/g, "'"),
S.replace(/\$"/g, '"')
S.replace(/\$"/g, '"'),
S.trim
)
// replace --zargs option with -Z