Bug #2365

Bad type for hash update when you try to get md5 from current time (duktape api v1)

Added by Leonid Protasov over 6 years ago. Updated over 6 years ago.

Status:FixedStart date:11/14/2014
Priority:NormalDue date:
Assignee:Andreas Smas% Done:

100%

Category:API
Target version:4.8
Found in version:4.7.486 Platform:Linux

Description

This code was properly working earlier:

showtime.print(showtime.md5digest(new Date().getTime()));

Now it does:

copy            [ERROR]: Error (Bad type for hash update) at /root/showtime/src/ecmascript/es_crypto.c:116
copy            [ERROR]: STACK DUMP: Error: Bad type for hash update
                             /root/showtime/src/ecmascript/es_crypto.c:116
                             anon  native strict preventsyield
                             anon dataroot://resources/ecmascript/legacy/api-v1.js:10 tailcalled
                             anon file:///root/showtime-plugins/copydotcom/copy.js:92 preventsyield
                             apply  native strict preventsyield
                             anon showtime/page:213 preventsyield

Associated revisions

Revision ff678600
Added by Andreas Smas over 6 years ago

ecmascript: Implicit toString() in hashUpdate

Fixes #2365

Change included in version 4.7.487

History

#1 Updated by Leonid Protasov over 6 years ago

  • Subject changed from (Bad type for hash update (regression / duktape api v1) to Bad type for hash update when you try to get md5 from current time (duktape api v1)

This is not regression. I just did not try it on duktape. Works properly on javascript though.

#2 Updated by Andreas Smas over 6 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Also available in: Atom PDF