JSON parsing error: lexical error: invalid char in json text.\\x0a (Unsolved) #1967
Labels
3.x
Related to ModSecurity version 3.x
duplicate
Ops. Somebody else already hit that bump
RIP - Type - Usage
Related with usage (not a bug)
Milestone
This issue is unsolved & closed in #1964 JSON payload is not valid which is known already because ENTER is added in payload and asked to verify to reproduce this issue which is expected..
But in actual payload which we don't have any ENTER or special character still it's failing below VALID dummy payload shared to verify once again..
OWASP CRS 3.0
"message": "Failed to parse request body.",
"details": {
"message": "Warning. Match of "eq 0" against "REQBODY_ERROR" required.",
"data": "JSON parsing error: lexical error: invalid char in json text.\x0a",
"file": "rules/REQUEST-920-PROTOCOL-ENFORCEMENT.conf",
"line": "143"
},
POST request with JSON payload sent but not special characters or empty string and it's very strange issue to get it resolved.
Dummy Payload below...
{"test_val":false,"test":[{"test":"test_test_test.doc","_val":"1-a1b2c3d4e5e7e8e9te","testTypeDiff":"valueTest","state":"process","_values":{"test":0,"testone":["a1b2c3d4e5e7e8e9te"]},"testID":"test:+0000000000","testQ":"test:+0000000000","_test":"test_test_test.doc","testType":"dummy","testValue":"testValue","work":"8.0"}]}
The above one is valid JSON but still we are getting "JSON parsing error: lexical error: invalid char in json text.\x0a".
We verified HEX values \x0A (Line Feed Character) & 5C also in PCAP but still facing same error. Could you please help on this.
Similar Issue
JSON parsing error: lexical error: invalid char in json text.\x0a #1964
owasp-modsecurity/ModSecurity-nginx#125
The text was updated successfully, but these errors were encountered: