Skip to content

Proxyman converts escaped characters into real ones and breaks JSON correctness #1344

@ACATTAN

Description

@ACATTAN

Proxyman version? (Ex. Proxyman 1.4.3)

3.8.0

macOS Version? (Ex. mac 10.14)

12.5

Steps to reproduce

When sending a valid JSON which contains an escaped special character (e.g. \u000b), Proxyman converts it to its real value (0x0B) and forwards it this way to the server. This creates an invalid JSON at the server side.

If for example you send this request to the server (directly, without going through the proxy):

curl --request POST 'http://172.25.16.71:9094/v1/events' \
--header 'Content-Type: application/json' \
--data-raw '{
  "report": {
      "text":"hello\u000bworld!"
  }
}'

then the server gets it as-is, with the exact 6 characters - backslash, u, 0, 0, 0, b in the text field.

However, if you send the exact same request via Proxyman:

curl -x 'http://127.0.0.1:9090' --request POST 'http://172.25.16.71:9094/v1/events' \
--header 'Content-Type: application/json' \
--data-raw '{
  "report": {
      "text":"hello\u000bworld!"
  }
}'

then the \u000b is converted to 0x0B, which is wrong.

Expected behavior

Proxyman should forward the JSON request as-is without modifying \u000b into it real character, because if it does so - the validity of the JSON is broken.

This bug is btw rather important to us as it prevents some messages from being correctly parsed by our servers. Thanks 😄

Metadata

Metadata

Assignees

Labels

bugSomething isn't working✅ DoneTicket is addressed and fixed.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions