Closed SahilChoudhary22 closed 2 years ago
assets/shell-quote.js
to avoid modification in an external library. src/lib.js
and added cURL string preprocessing to handle incorrectly formed input.We should add additional handling for trailing &
in the URL which is not accounted for in the current regex.
We should add a safe check at arg.startsWith('$')
as well. And throw appropriate errors where necessary. Because we won't be able to handle all cases. And there can be malformed curls as well. the current message "t.startsWith is not a function" is not a friendly message
If this &
is still encountered after the handling like for example for:curl https://postman-echo.com/post -d foo1=bar1&foo2=bar2
these are clearly invalid. Then we should respond with an error saying "Please check your curl for unsanitised & character" or something similar.
@SahilChoudhary22 Looks good to me. Let's merge this and we can test this one beta.