summaryrefslogtreecommitdiff
path: root/lib/string_decoder.js
diff options
context:
space:
mode:
authorFelix Geisendörfer <felix@debuggable.com>2011-03-14 11:16:35 +0100
committerRyan Dahl <ry@tinyclouds.org>2011-03-14 13:16:31 -0700
commit9d4c5a12f499fd59156e16efce17f019e16708d8 (patch)
tree13a659b9402f6fb296d93afe601431728c97c4e7 /lib/string_decoder.js
parent2a05fe784d1c7ced3cee11e0d9e066b3bb0f361e (diff)
downloadandroid-node-v8-9d4c5a12f499fd59156e16efce17f019e16708d8.tar.gz
android-node-v8-9d4c5a12f499fd59156e16efce17f019e16708d8.tar.bz2
android-node-v8-9d4c5a12f499fd59156e16efce17f019e16708d8.zip
Crypto update should only accept strings / buffers
I have seen a lot of people trying to pass objects to crypto's update functions, assuming that it would somehow serialize the object before hashing. In reality, the object was converted to '[object Object]' which was then hashed, without any error message showing. This patch modifies the DecodeBytes function (used exclusively by crypto at this point) to complain when receiving anything but a string or buffer. Overall this should be a less-suprising, more robust behavior.
Diffstat (limited to 'lib/string_decoder.js')
0 files changed, 0 insertions, 0 deletions