You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for all of the work that you've put into this project!
When attempting to run a shell_transform with a python script I have a complex json string that includes inner single quotes that are not escaped out of.
For example, if I have the following json request:
{"flag_exists": "it doesn't"}
I'm met with the following error when running on a UNIX machine:
I believe that the place that this needs to be fixed is given below where if you add something along the lines of the below chunk it would fix the issue:
same problem on unix; data inclusive of single quoted strings aren't correctly escaped for the shell resulting in something along the lines of: {"foo": "'<bar>'"} trying to redirect to a file breaking the shell transform delegation to a python script for example
Hi, thanks for all of the work that you've put into this project!
When attempting to run a
shell_transform
with a python script I have a complexjson
string that includes inner single quotes that are not escaped out of.For example, if I have the following
json
request:I'm met with the following error when running on a UNIX machine:
This is even shown in the code highlighting above. It looks like the tests are already sort of aware of this: https://github.com/bbyars/mountebank/blob/master/test/models/behaviors/shellTransformTest.js#L47-L52
I believe that the place that this needs to be fixed is given below where if you add something along the lines of the below chunk it would fix the issue:
https://stackoverflow.com/questions/1250079/how-to-escape-single-quotes-within-single-quoted-strings#:~:text=I%20can%20confirm%20that%20using,quotes%20here%20are%20single%20quotes).
mountebank/src/models/behaviors.js
Lines 141 to 153 in 005aac0
The text was updated successfully, but these errors were encountered: