You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_.every calls the function HDPrivateKey.isValidPath with two args:
The first arg is the expected parsed number of the derivation path
The second (unexpected) arg is the index of the root array which toggles the hardening parameter of the function (isValidPath), which is clearly unintended
An easy fix is to introduce an anonymous function as shown in this PR: #3359
The text was updated successfully, but these errors were encountered:
@SmartArray Just so I'm clear, you are not having any issues with the outcome of isValidPath, correct? The strict check for hardened === true in the line below ensures that passing in the array index via _.every doesn't have an effect.
If this is "just" a code smell issue (read: not imminently urgent), then we'll want to reconcile #3359 with #3350. The same issue exists, but will inevitably result in merge conflicts between the two.
We found a flaw with the string typed key derivation function at the following call:
bitcore/packages/bitcore-lib/lib/hdprivatekey.js
Lines 74 to 78 in bed0702
_.every
calls the functionHDPrivateKey.isValidPath
with two args:isValidPath
), which is clearly unintendedAn easy fix is to introduce an anonymous function as shown in this PR: #3359
The text was updated successfully, but these errors were encountered: