hd.
This commit is contained in:
parent
559cb62889
commit
370b5aeb24
@ -366,11 +366,12 @@ HD.parsePath = function parsePath(path, max) {
|
|||||||
if (max == null)
|
if (max == null)
|
||||||
max = constants.hd.MAX_INDEX;
|
max = constants.hd.MAX_INDEX;
|
||||||
|
|
||||||
if (constants.hd.PATH_ROOTS.indexOf(path) !== -1)
|
if (root !== 'm'
|
||||||
return result;
|
&& root !== 'M'
|
||||||
|
&& root !== 'm\''
|
||||||
if (constants.hd.PATH_ROOTS.indexOf(root) === -1)
|
&& root !== 'M\'') {
|
||||||
throw new Error('Bad path root.');
|
throw new Error('Bad path root.');
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < parts.length; i++) {
|
for (i = 0; i < parts.length; i++) {
|
||||||
index = parts[i];
|
index = parts[i];
|
||||||
|
|||||||
@ -516,8 +516,7 @@ exports.hd = {
|
|||||||
HARDENED: 0x80000000,
|
HARDENED: 0x80000000,
|
||||||
MAX_INDEX: 0x100000000,
|
MAX_INDEX: 0x100000000,
|
||||||
MIN_ENTROPY: 128 / 8,
|
MIN_ENTROPY: 128 / 8,
|
||||||
MAX_ENTROPY: 512 / 8,
|
MAX_ENTROPY: 512 / 8
|
||||||
PATH_ROOTS: ['m', 'M', 'm\'', 'M\'']
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user