Why does EWS GetMessageList fail with hexadecimal value 0x01, is an invalid character in R2016 R1.1

+1 vote
asked Aug 10, 2016 by TheRealPopeye (740 points)

An email has been received in a client inbox with a subject that contains an SOH character (character 0x01).

When trying to read the contents of the inbox using Rebex Exchange Web Services GetMessageList, the call fails with the error message;

{"'\u0001', hexadecimal value 0x01, is an invalid character. Line 1, position 1218."}

Is there a workaround or fix for this?

Incidentally - Rebex IMAP reads it just fine.

Thanks
John

Applies to: Rebex Secure Mail
commented Aug 10, 2016 by TheRealPopeye (740 points)
Update... I've just tried with the latest binaries from 2016 R2.1 and the issue is still apparent.
commented Aug 11, 2016 by Pavel Matyska (9,740 points)
Hi,

SOH character (hex 0x01) is not a valid character in XML. Since EWS uses SOAP which is XML based protocol, and the subject value is send in a XML tag, this results in that failure. Furtunately, this character check can be turned off, so we can make a hotfix for you. If you have a valid licence, please let us know on support@rebex.net and we will send you full version of that hotfix. I will post a link to a trial version of that fix here on the forum today.
commented Aug 29, 2016 by Tomas Knopp (58,580 points)
The hotfix has been officially released as part of version 2016 R2.2. http://blog.rebex.net/version-2016-r2-2/

1 Answer

+1 vote
answered Aug 11, 2016 by Pavel Matyska (9,740 points)
edited Aug 29, 2016 by Tomas Knopp

UPDATE

Since Rebex Secure Mail version 2016 R2.2 we have relaxed the SOAP XML check to allow ASCII control characters. This error will no longer occur with the latest version of Rebex components.


Hi,
here is the promised link to the trial hotfix build which makes it possible to parse SOAP messages that contains ASCII control characters, such as SOH (hex 0x01).

commented Aug 11, 2016 by TheRealPopeye (740 points)
Pavel, I downloaded the binaries you sent me the link for and it is working perfectly with that hotfix.
Thanks for such a speedy response.
...