JSON payload includes an extra space when using python scripts
Have you gone through the Documentation or Video Tutorial
- Documentation - https://pycript.souravkalal.tech/
- Video - https://youtu.be/J8KE5VR8yDk?si=yr4XqqwWh5ms7O6s
- [Y/N] - Y
Describe the bug When you use the automatic encryption feature with Python along with the Request Type of parameter value, the resulting payload adds an additional space in the json body causing an error. It is between the key and the value (after the colon).
To Reproduce Steps to reproduce the behavior:
- Configure settings similar to screenshot below
- Use automatic encrypt function with a JSON request
- Observe the extra space in the resulting request in the Logger/Comparer tab of BurpSuite
Expected behavior An extra space should not be added, the payload should sit exactly in the same spot as before. This is not an issue with the encrypting script, as the resulting payload is exactly correct. Removing the space causes the request to successfully pass.
Screenshots
Desktop (please complete the following information):
- PyCript Version .3
Try changing the call to _nx( with _function('_nx, like this:
{{ function('_nx', 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', comments|length, 'comments title', 'timberscores')|format(function('number_format_i18n', comments|length), '<span>' ~ post.title ~ '</span>') }}
I must have written that part while also adding those translation functions to timber... however it's an open issue, which you can follow here: https://github.com/jarednova/timber/pull/246