https://github.com/felixge/node-formidable/blob/master/lib/incoming_form.js#L516
The code used to generate the file-name looks quite fishy to me - to say the least:
var name = '';
for (var i = 0; i < 32; i++) {
name += Math.floor(Math.random() * 16).toString(16);
}
Is there any reason why you don't use the NodeJS crypto API (specifically crypto.createHash(algorithm) or alike) to get an actual hash and not this "Hey let's concat the single-char content from the provably insecure Math.random() function of doom?"
Cheers,
.mario
https://github.com/felixge/node-formidable/blob/master/lib/incoming_form.js#L516
The code used to generate the file-name looks quite fishy to me - to say the least:
Is there any reason why you don't use the NodeJS crypto API (specifically
crypto.createHash(algorithm)or alike) to get an actual hash and not this "Hey let's concat the single-char content from the provably insecure Math.random() function of doom?"Cheers,
.mario