Forum Discussion

blim_349200's avatar
blim_349200
Icon for Nimbostratus rankNimbostratus
Jan 19, 2018

ASM blocking invalid character?

I'm getting the following errors on a POST that contains a UTF-16/unicode encoded body:

 

  1. "Malformed document - illegal character encountered - json syntax error". The first character in the POST body is highlighted for this, and it is a curly brace "{".

     

  2. "Null in request - Binary request data contains forbidden NULL".

     

I'm not detecting any null bytes (assuming each character is read as 2 bytes) and I checked the JSON reported against a validator and it comes out as valid.

 

Could ASM give a false alarm for unicode-encoded POSTs?

 

The POST body always starts with the following bytes, which is just curly brace plus new line and space: (ASCII value and UTF16 hex): 123 (0x7B00), 13 (0x0D00), 10 (0x0A00), 32 (0x2000), 32 (0x2000)

 

Also, the header of the POST includes: Content-Type: application/json; charset=utf-16