malufett / crypto-js

Automatically exported from code.google.com/p/crypto-js
0 stars 0 forks source link

IE8 IE9 Ajax with XDomainRequest + AES = Malformed Utf-8 data #117

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
On internet explorer 8, 9 when receiving encrypted by AES data from ajax with 
XDomainRequest, that mean from cross-domain ajax. And Decrypting it, then when 
trying to do .toString(CryptoJS.enc.Utf8) - is throwing an error "Malformed 
Utf-8 data". If i will try to use another charset for example Latin1 etc - 
decrypted result is wrong.

Server before transfer response output the header "Content-type: text/plain; 
charset=UTF-8" or tried "Content-type: text/plain" too.

In all other major browsers, even in latest IE everything works fine and no 
throwing error like that and decrypted data is correct.

Tested on Windows 7 64-bit, IE10 with compatible mode, IETester(IE8, IE9) - got 
this problem. IE10 without compatible mode - works fine.
CryptoJS version 3.1.2

Original issue reported on code.google.com by payal...@gmail.com on 14 Feb 2014 at 3:54

GoogleCodeExporter commented 8 years ago
Problem is decided, it was not CryptoJS problem. That was the problem of 
encryption on server side.

Original comment by payal...@gmail.com on 14 Mar 2014 at 2:34