I try to send an encrypted file that I uploaded from the client to the node.js server, but every time I get an error:
InternalError: too much recursion
I encrypted the downloaded file using the Crypto-JS library:
main.js
function loaded(evt) { var arrayFileBuffer = evt.target.result; var arrayFileTyped = new Uint8Array(arrayFileBuffer); var wordArray = CryptoJS.lib.WordArray.create(arrayFileTyped); var encrypted = CryptoJS.AES.encrypt(wordArray, m_secret_key_x.toString()); socket.emit('send_file', encrypted); }
And socket.emit('send_file', encrypted) is the part where it crashes.
In Mozilla Firebug, I see that the _hasBinary() function from Socket.IO been called many times, and I think that it causes too many recursion errors.
Any help in solving this problem would be appreciated, thanks in advance!
source share