node-red-contrib-web-worldmap 5.7.1 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +3 -1
- package/node_modules/es-object-atoms/CHANGELOG.md +21 -14
- package/node_modules/es-object-atoms/isObject.d.ts +1 -1
- package/node_modules/es-object-atoms/package.json +6 -7
- package/node_modules/es-object-atoms/tsconfig.json +1 -0
- package/node_modules/express/History.md +9 -0
- package/node_modules/express/lib/utils.js +2 -1
- package/node_modules/express/package.json +3 -3
- package/node_modules/qs/CHANGELOG.md +178 -0
- package/node_modules/qs/README.md +19 -1
- package/node_modules/qs/dist/qs.js +17 -17
- package/node_modules/qs/eslint.config.mjs +1 -0
- package/node_modules/qs/lib/parse.js +57 -25
- package/node_modules/qs/lib/stringify.js +11 -4
- package/node_modules/qs/lib/utils.js +2 -0
- package/node_modules/qs/package.json +3 -3
- package/node_modules/qs/test/parse.js +195 -4
- package/node_modules/qs/test/stringify.js +138 -0
- package/node_modules/qs/test/utils.js +38 -3
- package/node_modules/uuid/README.md +182 -177
- package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs/index.js +31 -0
- package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/max.js +3 -0
- package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
- package/node_modules/uuid/dist/cjs/native.js +4 -0
- package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/node_modules/uuid/dist/cjs/package.json +1 -0
- package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs/types.js +2 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs/v35.js +44 -0
- package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v6.js +22 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/version.js +10 -0
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs-browser/v35.js +44 -0
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v6.js +22 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
- package/node_modules/uuid/dist/esm/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm/index.d.ts +15 -0
- package/node_modules/uuid/dist/{esm-node → esm}/index.js +9 -4
- package/node_modules/uuid/dist/esm/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm/max.js +1 -0
- package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
- package/node_modules/uuid/dist/esm/md5.js +11 -0
- package/node_modules/uuid/dist/esm/native.d.ts +6 -0
- package/node_modules/uuid/dist/esm/native.js +2 -0
- package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm/nil.js +1 -0
- package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm/parse.js +9 -0
- package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm/regex.js +1 -0
- package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm/rng.js +10 -0
- package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/esm/sha1.js +11 -0
- package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm/stringify.js +35 -0
- package/node_modules/uuid/dist/esm/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm/types.js +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm/v1.js +83 -0
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v3.js +9 -0
- package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm/v35.js +39 -0
- package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v4.js +27 -0
- package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v5.js +9 -0
- package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v6.js +20 -0
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v7.js +65 -0
- package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm/validate.js +5 -0
- package/node_modules/uuid/dist/esm/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm/version.js +8 -0
- package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm-browser/index.js +9 -4
- package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +113 -193
- package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/native.js +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -1
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +6 -32
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +8 -16
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +62 -88
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +32 -27
- package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm-browser/types.js +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +78 -90
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +8 -3
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +33 -58
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +23 -20
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +8 -3
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v6.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +65 -0
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +2 -4
- package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/version.js +5 -8
- package/node_modules/uuid/package.json +80 -83
- package/package.json +5 -2
- package/worldmap/worldmap.js +7 -0
- package/worldmap.html +1 -1
- package/node_modules/body-parser/node_modules/qs/.editorconfig +0 -46
- package/node_modules/body-parser/node_modules/qs/.github/FUNDING.yml +0 -12
- package/node_modules/body-parser/node_modules/qs/.github/SECURITY.md +0 -11
- package/node_modules/body-parser/node_modules/qs/.github/THREAT_MODEL.md +0 -78
- package/node_modules/body-parser/node_modules/qs/.nycrc +0 -13
- package/node_modules/body-parser/node_modules/qs/CHANGELOG.md +0 -822
- package/node_modules/body-parser/node_modules/qs/LICENSE.md +0 -29
- package/node_modules/body-parser/node_modules/qs/README.md +0 -758
- package/node_modules/body-parser/node_modules/qs/dist/qs.js +0 -141
- package/node_modules/body-parser/node_modules/qs/eslint.config.mjs +0 -57
- package/node_modules/body-parser/node_modules/qs/lib/formats.js +0 -23
- package/node_modules/body-parser/node_modules/qs/lib/index.js +0 -11
- package/node_modules/body-parser/node_modules/qs/lib/parse.js +0 -403
- package/node_modules/body-parser/node_modules/qs/lib/stringify.js +0 -363
- package/node_modules/body-parser/node_modules/qs/lib/utils.js +0 -342
- package/node_modules/body-parser/node_modules/qs/package.json +0 -94
- package/node_modules/body-parser/node_modules/qs/test/empty-keys-cases.js +0 -267
- package/node_modules/body-parser/node_modules/qs/test/parse.js +0 -1703
- package/node_modules/body-parser/node_modules/qs/test/stringify.js +0 -1448
- package/node_modules/body-parser/node_modules/qs/test/utils.js +0 -432
- package/node_modules/uuid/CHANGELOG.md +0 -229
- package/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/uuid/dist/bin/uuid +0 -2
- package/node_modules/uuid/dist/esm-node/md5.js +0 -13
- package/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/node_modules/uuid/dist/esm-node/parse.js +0 -35
- package/node_modules/uuid/dist/esm-node/regex.js +0 -1
- package/node_modules/uuid/dist/esm-node/rng.js +0 -12
- package/node_modules/uuid/dist/esm-node/sha1.js +0 -13
- package/node_modules/uuid/dist/esm-node/stringify.js +0 -29
- package/node_modules/uuid/dist/esm-node/v1.js +0 -95
- package/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/node_modules/uuid/dist/esm-node/v35.js +0 -64
- package/node_modules/uuid/dist/esm-node/v4.js +0 -24
- package/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/node_modules/uuid/dist/esm-node/validate.js +0 -7
- package/node_modules/uuid/dist/esm-node/version.js +0 -11
- package/node_modules/uuid/dist/index.js +0 -79
- package/node_modules/uuid/dist/md5-browser.js +0 -223
- package/node_modules/uuid/dist/md5.js +0 -23
- package/node_modules/uuid/dist/nil.js +0 -8
- package/node_modules/uuid/dist/parse.js +0 -45
- package/node_modules/uuid/dist/regex.js +0 -8
- package/node_modules/uuid/dist/rng-browser.js +0 -26
- package/node_modules/uuid/dist/rng.js +0 -24
- package/node_modules/uuid/dist/sha1-browser.js +0 -104
- package/node_modules/uuid/dist/sha1.js +0 -23
- package/node_modules/uuid/dist/stringify.js +0 -39
- package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
- package/node_modules/uuid/dist/uuid-bin.js +0 -85
- package/node_modules/uuid/dist/v1.js +0 -107
- package/node_modules/uuid/dist/v3.js +0 -16
- package/node_modules/uuid/dist/v35.js +0 -78
- package/node_modules/uuid/dist/v4.js +0 -37
- package/node_modules/uuid/dist/v5.js +0 -16
- package/node_modules/uuid/dist/validate.js +0 -17
- package/node_modules/uuid/dist/version.js +0 -21
- package/node_modules/uuid/wrapper.mjs +0 -10
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import rng from './rng.js';
|
|
2
|
+
import { unsafeStringify } from './stringify.js';
|
|
3
|
+
const _state = {};
|
|
4
|
+
function v7(options, buf, offset) {
|
|
5
|
+
let bytes;
|
|
6
|
+
if (options) {
|
|
7
|
+
bytes = v7Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.seq, buf, offset);
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
const now = Date.now();
|
|
11
|
+
const rnds = rng();
|
|
12
|
+
updateV7State(_state, now, rnds);
|
|
13
|
+
bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset);
|
|
14
|
+
}
|
|
15
|
+
return buf ?? unsafeStringify(bytes);
|
|
16
|
+
}
|
|
17
|
+
export function updateV7State(state, now, rnds) {
|
|
18
|
+
state.msecs ??= -Infinity;
|
|
19
|
+
state.seq ??= 0;
|
|
20
|
+
if (now > state.msecs) {
|
|
21
|
+
state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
|
|
22
|
+
state.msecs = now;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
state.seq = (state.seq + 1) | 0;
|
|
26
|
+
if (state.seq === 0) {
|
|
27
|
+
state.msecs++;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return state;
|
|
31
|
+
}
|
|
32
|
+
function v7Bytes(rnds, msecs, seq, buf, offset = 0) {
|
|
33
|
+
if (rnds.length < 16) {
|
|
34
|
+
throw new Error('Random bytes length must be >= 16');
|
|
35
|
+
}
|
|
36
|
+
if (!buf) {
|
|
37
|
+
buf = new Uint8Array(16);
|
|
38
|
+
offset = 0;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
42
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
msecs ??= Date.now();
|
|
46
|
+
seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
|
|
47
|
+
buf[offset++] = (msecs / 0x10000000000) & 0xff;
|
|
48
|
+
buf[offset++] = (msecs / 0x100000000) & 0xff;
|
|
49
|
+
buf[offset++] = (msecs / 0x1000000) & 0xff;
|
|
50
|
+
buf[offset++] = (msecs / 0x10000) & 0xff;
|
|
51
|
+
buf[offset++] = (msecs / 0x100) & 0xff;
|
|
52
|
+
buf[offset++] = msecs & 0xff;
|
|
53
|
+
buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f);
|
|
54
|
+
buf[offset++] = (seq >>> 20) & 0xff;
|
|
55
|
+
buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f);
|
|
56
|
+
buf[offset++] = (seq >>> 6) & 0xff;
|
|
57
|
+
buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03);
|
|
58
|
+
buf[offset++] = rnds[11];
|
|
59
|
+
buf[offset++] = rnds[12];
|
|
60
|
+
buf[offset++] = rnds[13];
|
|
61
|
+
buf[offset++] = rnds[14];
|
|
62
|
+
buf[offset++] = rnds[15];
|
|
63
|
+
return buf;
|
|
64
|
+
}
|
|
65
|
+
export default v7;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import validate from './validate.js';
|
|
2
|
-
|
|
3
2
|
function version(uuid) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return parseInt(uuid.substr(14, 1), 16);
|
|
3
|
+
if (!validate(uuid)) {
|
|
4
|
+
throw TypeError('Invalid UUID');
|
|
5
|
+
}
|
|
6
|
+
return parseInt(uuid.slice(14, 15), 16);
|
|
9
7
|
}
|
|
10
|
-
|
|
11
|
-
export default version;
|
|
8
|
+
export default version;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uuid",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "11.1.1",
|
|
4
|
+
"description": "RFC9562 UUIDs",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"funding": [
|
|
7
|
+
"https://github.com/sponsors/broofa",
|
|
8
|
+
"https://github.com/sponsors/ctavan"
|
|
9
|
+
],
|
|
5
10
|
"commitlint": {
|
|
6
11
|
"extends": [
|
|
7
12
|
"@commitlint/config-conventional"
|
|
@@ -10,126 +15,118 @@
|
|
|
10
15
|
"keywords": [
|
|
11
16
|
"uuid",
|
|
12
17
|
"guid",
|
|
13
|
-
"rfc4122"
|
|
18
|
+
"rfc4122",
|
|
19
|
+
"rfc9562"
|
|
14
20
|
],
|
|
15
21
|
"license": "MIT",
|
|
16
22
|
"bin": {
|
|
17
|
-
"uuid": "./dist/bin/uuid"
|
|
23
|
+
"uuid": "./dist/esm/bin/uuid"
|
|
18
24
|
},
|
|
19
25
|
"sideEffects": false,
|
|
20
|
-
"main": "./dist/index.js",
|
|
26
|
+
"main": "./dist/cjs/index.js",
|
|
21
27
|
"exports": {
|
|
22
28
|
".": {
|
|
23
29
|
"node": {
|
|
24
|
-
"
|
|
25
|
-
"require": "./dist/index.js"
|
|
26
|
-
|
|
30
|
+
"import": "./dist/esm/index.js",
|
|
31
|
+
"require": "./dist/cjs/index.js"
|
|
32
|
+
},
|
|
33
|
+
"browser": {
|
|
34
|
+
"import": "./dist/esm-browser/index.js",
|
|
35
|
+
"require": "./dist/cjs-browser/index.js"
|
|
27
36
|
},
|
|
28
37
|
"default": "./dist/esm-browser/index.js"
|
|
29
38
|
},
|
|
30
39
|
"./package.json": "./package.json"
|
|
31
40
|
},
|
|
32
|
-
"module": "./dist/esm
|
|
41
|
+
"module": "./dist/esm/index.js",
|
|
33
42
|
"browser": {
|
|
34
|
-
"./dist/
|
|
35
|
-
"./dist/
|
|
36
|
-
"./dist/sha1.js": "./dist/sha1-browser.js",
|
|
37
|
-
"./dist/esm-node/index.js": "./dist/esm-browser/index.js"
|
|
43
|
+
"./dist/esm/index.js": "./dist/esm-browser/index.js",
|
|
44
|
+
"./dist/cjs/index.js": "./dist/cjs-browser/index.js"
|
|
38
45
|
},
|
|
39
46
|
"files": [
|
|
40
|
-
"CHANGELOG.md",
|
|
41
|
-
"CONTRIBUTING.md",
|
|
42
|
-
"LICENSE.md",
|
|
43
|
-
"README.md",
|
|
44
47
|
"dist",
|
|
45
|
-
"
|
|
48
|
+
"!dist/**/test"
|
|
46
49
|
],
|
|
47
50
|
"devDependencies": {
|
|
48
|
-
"@babel/
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"eslint": "
|
|
57
|
-
"eslint-
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"eslint-plugin-standard": "4.0.1",
|
|
64
|
-
"husky": "4.3.0",
|
|
65
|
-
"jest": "25.5.4",
|
|
66
|
-
"lint-staged": "10.4.0",
|
|
51
|
+
"@babel/eslint-parser": "7.25.9",
|
|
52
|
+
"@commitlint/cli": "19.6.1",
|
|
53
|
+
"@commitlint/config-conventional": "19.6.0",
|
|
54
|
+
"@eslint/js": "9.17.0",
|
|
55
|
+
"@types/eslint__js": "8.42.3",
|
|
56
|
+
"bundlewatch": "0.4.0",
|
|
57
|
+
"commander": "12.1.0",
|
|
58
|
+
"eslint": "9.17.0",
|
|
59
|
+
"eslint-config-prettier": "9.1.0",
|
|
60
|
+
"eslint-plugin-prettier": "5.2.1",
|
|
61
|
+
"globals": "15.14.0",
|
|
62
|
+
"husky": "9.1.7",
|
|
63
|
+
"jest": "29.7.0",
|
|
64
|
+
"lint-staged": "15.2.11",
|
|
65
|
+
"neostandard": "0.12.0",
|
|
67
66
|
"npm-run-all": "4.1.5",
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"standard-version": "9.0.0"
|
|
67
|
+
"prettier": "3.4.2",
|
|
68
|
+
"release-please": "16.15.0",
|
|
69
|
+
"runmd": "1.4.1",
|
|
70
|
+
"standard-version": "9.5.0",
|
|
71
|
+
"typescript": "5.0.4",
|
|
72
|
+
"typescript-eslint": "8.18.2"
|
|
75
73
|
},
|
|
76
74
|
"optionalDevDependencies": {
|
|
77
|
-
"@wdio/browserstack-service": "
|
|
78
|
-
"@wdio/cli": "
|
|
79
|
-
"@wdio/jasmine-framework": "
|
|
80
|
-
"@wdio/local-runner": "
|
|
81
|
-
"@wdio/spec-reporter": "
|
|
82
|
-
"@wdio/static-server-service": "
|
|
83
|
-
"@wdio/sync": "6.4.0"
|
|
75
|
+
"@wdio/browserstack-service": "9.2.1",
|
|
76
|
+
"@wdio/cli": "9.2.1",
|
|
77
|
+
"@wdio/jasmine-framework": "9.2.1",
|
|
78
|
+
"@wdio/local-runner": "9.2.1",
|
|
79
|
+
"@wdio/spec-reporter": "9.1.3",
|
|
80
|
+
"@wdio/static-server-service": "9.1.3"
|
|
84
81
|
},
|
|
85
82
|
"scripts": {
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
83
|
+
"build": "./scripts/build.sh",
|
|
84
|
+
"build:watch": "tsc --watch -p tsconfig.esm.json",
|
|
85
|
+
"bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
|
|
86
|
+
"docs:diff": "npm run docs && git diff --quiet README.md",
|
|
87
|
+
"docs": "npm run build && npx runmd --output=README.md README_js.md",
|
|
88
|
+
"eslint:check": "eslint src/ test/ examples/ *.[jt]s",
|
|
89
|
+
"eslint:fix": "eslint --fix src/ test/ examples/ *.[jt]s",
|
|
90
|
+
"examples:browser:rollup:build": "cd examples/browser-rollup && npm run build",
|
|
91
|
+
"examples:browser:webpack:build": "cd examples/browser-webpack && npm run build",
|
|
92
|
+
"examples:node:commonjs:test": "cd examples/node-commonjs && npm test",
|
|
93
|
+
"examples:node:esmodules:test": "cd examples/node-esmodules && npm test",
|
|
94
|
+
"examples:node:jest:test": "cd examples/node-jest && npm test",
|
|
95
|
+
"examples:node:typescript:test": "cd examples/typescript && npm test",
|
|
90
96
|
"lint": "npm run eslint:check && npm run prettier:check",
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"pretest:
|
|
96
|
-
"
|
|
97
|
+
"md": "runmd --watch --output=README.md README_js.md",
|
|
98
|
+
"prepack": "npm run build -- --no-pack",
|
|
99
|
+
"prepare": "husky",
|
|
100
|
+
"prepublishOnly": "npm run build",
|
|
101
|
+
"pretest:benchmark": "npm run build",
|
|
102
|
+
"pretest:browser": "./scripts/iodd && npm run build && npm-run-all --parallel examples:browser:**",
|
|
97
103
|
"pretest:node": "npm run build",
|
|
104
|
+
"pretest": "npm run build",
|
|
105
|
+
"prettier:check": "prettier --check .",
|
|
106
|
+
"prettier:fix": "prettier --write .",
|
|
107
|
+
"release": "standard-version --no-verify",
|
|
108
|
+
"test:benchmark": "cd examples/benchmark && npm test",
|
|
109
|
+
"test:browser": "wdio run ./wdio.conf.js",
|
|
98
110
|
"test:node": "npm-run-all --parallel examples:node:**",
|
|
99
|
-
"test:
|
|
100
|
-
"
|
|
101
|
-
"test:benchmark": "cd examples/benchmark && npm install && npm test",
|
|
102
|
-
"prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",
|
|
103
|
-
"prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",
|
|
104
|
-
"bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
|
|
105
|
-
"md": "runmd --watch --output=README.md README_js.md",
|
|
106
|
-
"docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )",
|
|
107
|
-
"docs:diff": "npm run docs && git diff --quiet README.md",
|
|
108
|
-
"build": "./scripts/build.sh",
|
|
109
|
-
"prepack": "npm run build",
|
|
110
|
-
"release": "standard-version --no-verify"
|
|
111
|
+
"test:watch": "node --test --enable-source-maps --watch dist/esm/test/*.js",
|
|
112
|
+
"test": "node --test --enable-source-maps dist/esm/test/*.js"
|
|
111
113
|
},
|
|
112
114
|
"repository": {
|
|
113
115
|
"type": "git",
|
|
114
116
|
"url": "https://github.com/uuidjs/uuid.git"
|
|
115
117
|
},
|
|
116
|
-
"husky": {
|
|
117
|
-
"hooks": {
|
|
118
|
-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
|
119
|
-
"pre-commit": "lint-staged"
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
118
|
"lint-staged": {
|
|
123
|
-
"
|
|
124
|
-
"prettier --write"
|
|
119
|
+
"*": [
|
|
120
|
+
"prettier --no-error-on-unmatched-pattern --write"
|
|
125
121
|
],
|
|
126
122
|
"*.{js,jsx}": [
|
|
127
|
-
"eslint --fix"
|
|
123
|
+
"eslint --no-error-on-unmatched-pattern --fix"
|
|
128
124
|
]
|
|
129
125
|
},
|
|
130
126
|
"standard-version": {
|
|
131
127
|
"scripts": {
|
|
132
128
|
"postchangelog": "prettier --write CHANGELOG.md"
|
|
133
129
|
}
|
|
134
|
-
}
|
|
130
|
+
},
|
|
131
|
+
"packageManager": "npm@11.0.0"
|
|
135
132
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-web-worldmap",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@turf/bezier-spline": "7.3.5",
|
|
7
7
|
"cgi": "0.3.1",
|
|
8
8
|
"compression": "1.8.1",
|
|
9
|
-
"express": "4.22.
|
|
9
|
+
"express": "4.22.2",
|
|
10
10
|
"sockjs": "0.3.24"
|
|
11
11
|
},
|
|
12
12
|
"overrides": {
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
"body-parser": {
|
|
15
15
|
"qs": "6.15.2"
|
|
16
16
|
}
|
|
17
|
+
},
|
|
18
|
+
"sockjs": {
|
|
19
|
+
"uuid": "11.1.1"
|
|
17
20
|
}
|
|
18
21
|
},
|
|
19
22
|
"bundledDependencies": [
|
package/worldmap/worldmap.js
CHANGED
|
@@ -2525,6 +2525,9 @@ function setMarker(data) {
|
|
|
2525
2525
|
if (data.ttl != 0) {
|
|
2526
2526
|
marker.ts = parseInt(Date.now()/1000) + Number(data.ttl);
|
|
2527
2527
|
}
|
|
2528
|
+
else {
|
|
2529
|
+
if (marker.hasOwnProperty("ts")) { delete marker.ts; }
|
|
2530
|
+
}
|
|
2528
2531
|
delete data.ttl;
|
|
2529
2532
|
}
|
|
2530
2533
|
else if (maxage != 0) {
|
|
@@ -2650,6 +2653,10 @@ function setMarker(data) {
|
|
|
2650
2653
|
|
|
2651
2654
|
marker.lay = lay; // and the layer it is on
|
|
2652
2655
|
|
|
2656
|
+
marker.on("dblclick", function (ev) {
|
|
2657
|
+
L.DomEvent.stopPropagation(ev)
|
|
2658
|
+
});
|
|
2659
|
+
|
|
2653
2660
|
// marker.on('click', function(e) {
|
|
2654
2661
|
// //ws.send(JSON.stringify({action:"click",name:marker.name,layer:marker.lay,icon:marker.icon,iconColor:marker.iconColor,SIDC:marker.SIDC,draggable:true,lat:parseFloat(marker.getLatLng().lat.toFixed(6)),lon:parseFloat(marker.getLatLng().lng.toFixed(6))}));
|
|
2655
2662
|
// var fb = allData[marker.name];
|
package/worldmap.html
CHANGED
|
@@ -133,10 +133,10 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
|
|
|
133
133
|
<li><code>icon</code> : <a href="https://fontawesome.com/v4.7.0/icons/" target="_new">font awesome</a> icon name or <a href="https://github.com/dceejay/RedMap/blob/master/emojilist.md" target="_new">:emoji name:</a>, or url of icon image.</li>
|
|
134
134
|
<li><code>iconColor</code> : standard CSS color name or #rrggbb hex value.</li>
|
|
135
135
|
<li><code>SIDC</code> : NATO symbology code (instead of icon).</li>
|
|
136
|
+
<li><code>ttl</code> : time to live of an individual marker before deletion. 0 = infinite/no timeout.</li>
|
|
136
137
|
<li><code>label</code> : permanent label next to marker, or</li>
|
|
137
138
|
<li><code>tooltip</code> : hover over text for marker. (alternative to label)</li>
|
|
138
139
|
<li><code>bulding</code> : OSMBuildings GeoJSON object.</li>
|
|
139
|
-
<li><code>ttl</code> : time to live of an individual marker before deletion.</li>
|
|
140
140
|
<li><code>photoUrl</code> : adds an image pointed at by the url to the popup box.</li>
|
|
141
141
|
<li><code>videoUrl</code> : adds an mp4 (320x240) pointed at by the url to Popup box</li>
|
|
142
142
|
<li><code>weblink</code> : link to an external web page.</li>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
root = true
|
|
2
|
-
|
|
3
|
-
[*]
|
|
4
|
-
indent_style = space
|
|
5
|
-
indent_size = 4
|
|
6
|
-
end_of_line = lf
|
|
7
|
-
charset = utf-8
|
|
8
|
-
trim_trailing_whitespace = true
|
|
9
|
-
insert_final_newline = true
|
|
10
|
-
max_line_length = 180
|
|
11
|
-
quote_type = single
|
|
12
|
-
|
|
13
|
-
[test/*]
|
|
14
|
-
max_line_length = off
|
|
15
|
-
|
|
16
|
-
[LICENSE.md]
|
|
17
|
-
indent_size = off
|
|
18
|
-
|
|
19
|
-
[*.md]
|
|
20
|
-
max_line_length = off
|
|
21
|
-
|
|
22
|
-
[*.json]
|
|
23
|
-
max_line_length = off
|
|
24
|
-
|
|
25
|
-
[Makefile]
|
|
26
|
-
max_line_length = off
|
|
27
|
-
|
|
28
|
-
[CHANGELOG.md]
|
|
29
|
-
indent_style = space
|
|
30
|
-
indent_size = 2
|
|
31
|
-
|
|
32
|
-
[LICENSE]
|
|
33
|
-
indent_size = 2
|
|
34
|
-
max_line_length = off
|
|
35
|
-
|
|
36
|
-
[coverage/**/*]
|
|
37
|
-
indent_size = off
|
|
38
|
-
indent_style = off
|
|
39
|
-
indent = off
|
|
40
|
-
max_line_length = off
|
|
41
|
-
|
|
42
|
-
[.nycrc]
|
|
43
|
-
indent_style = tab
|
|
44
|
-
|
|
45
|
-
[tea.yaml]
|
|
46
|
-
indent_size = 2
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: [ljharb]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: npm/qs
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
otechie: # Replace with a single Otechie username
|
|
12
|
-
custom: # Replace with a single custom sponsorship URL
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Security
|
|
2
|
-
|
|
3
|
-
Please file a private vulnerability report via GitHub, email [@ljharb](https://github.com/ljharb), or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
|
4
|
-
|
|
5
|
-
## Incident Response Plan
|
|
6
|
-
|
|
7
|
-
Please see our [Incident Response Plan](https://github.com/ljharb/.github/blob/main/INCIDENT_RESPONSE_PLAN.md).
|
|
8
|
-
|
|
9
|
-
## Threat Model
|
|
10
|
-
|
|
11
|
-
Please see [THREAT_MODEL.md](./THREAT_MODEL.md).
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
## Threat Model for qs (querystring parsing library)
|
|
2
|
-
|
|
3
|
-
### 1. Library Overview
|
|
4
|
-
|
|
5
|
-
- **Library Name:** qs
|
|
6
|
-
- **Brief Description:** A JavaScript library for parsing and stringifying URL query strings, supporting nested objects and arrays. It is widely used in Node.js and web applications for processing query parameters[2][6][8].
|
|
7
|
-
- **Key Public APIs/Functions:** `qs.parse()`, `qs.stringify()`
|
|
8
|
-
|
|
9
|
-
### 2. Define Scope
|
|
10
|
-
|
|
11
|
-
This threat model focuses on the core parsing and stringifying functionality, specifically the handling of nested objects and arrays, option validation, and cycle management in stringification.
|
|
12
|
-
|
|
13
|
-
### 3. Conceptual System Diagram
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
Caller Application → qs.parse(input, options) → Parsing Engine → Output Object
|
|
17
|
-
│
|
|
18
|
-
└→ Options Handling
|
|
19
|
-
|
|
20
|
-
Caller Application → qs.stringify(obj, options) → Stringifying Engine → Output String
|
|
21
|
-
│
|
|
22
|
-
└→ Options Handling
|
|
23
|
-
└→ Cycle Tracking
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
**Trust Boundaries:**
|
|
27
|
-
- **Input string (parse):** May come from untrusted sources (e.g., user input, network requests)
|
|
28
|
-
- **Input object (stringify):** May contain cycles, which can lead to infinite loops during stringification
|
|
29
|
-
- **Options:** Provided by the caller
|
|
30
|
-
- **Cycle Tracking:** Used only during stringification to detect and handle circular references
|
|
31
|
-
|
|
32
|
-
### 4. Identify Assets
|
|
33
|
-
|
|
34
|
-
- **Integrity of parsed output:** Prevent malicious manipulation of the output object structure, especially ensuring builtins/globals are not modified as a result of parse[3][4][8].
|
|
35
|
-
- **Confidentiality of processed data:** Avoid leaking sensitive information through errors or output.
|
|
36
|
-
- **Availability/performance for host application:** Prevent crashes or resource exhaustion in the consuming application.
|
|
37
|
-
- **Security of host application:** Prevent the library from being a vector for attacks (e.g., prototype pollution, DoS).
|
|
38
|
-
- **Reputation of library:** Maintain trust by avoiding supply chain attacks and vulnerabilities[1].
|
|
39
|
-
|
|
40
|
-
### 5. Identify Threats
|
|
41
|
-
|
|
42
|
-
| Component / API / Interaction | S | T | R | I | D | E |
|
|
43
|
-
|---------------------------------------|----|----|----|----|----|----|
|
|
44
|
-
| Public API Call (`parse`) | – | ✓ | – | ✓ | ✓ | ✓ |
|
|
45
|
-
| Public API Call (`stringify`) | – | ✓ | – | ✓ | ✓ | – |
|
|
46
|
-
| Options Handling | ✓ | ✓ | – | ✓ | – | ✓ |
|
|
47
|
-
| Dependency Interaction | – | – | – | – | ✓ | – |
|
|
48
|
-
|
|
49
|
-
**Key Threats:**
|
|
50
|
-
- **Tampering:** Malicious input can, if not prevented, alter parsed output (e.g., prototype pollution via `__proto__`, modification of builtins/globals)[3][4][8].
|
|
51
|
-
- **Information Disclosure:** Error messages may expose internal details or sensitive data.
|
|
52
|
-
- **Denial of Service:** Large or malformed input can exhaust memory or CPU.
|
|
53
|
-
- **Elevation of Privilege:** Prototype pollution can lead to unintended privilege escalation in the host application[3][4][8].
|
|
54
|
-
|
|
55
|
-
### 6. Mitigation/Countermeasures
|
|
56
|
-
|
|
57
|
-
| Threat Identified | Proposed Mitigation |
|
|
58
|
-
|---------------------------------------------------|---------------------|
|
|
59
|
-
| Tampering (malicious input, prototype pollution) | Strict input validation; keep `allowPrototypes: false` by default; use `plainObjects` for output; ensure builtins/globals are never modified by parse[4][8]. |
|
|
60
|
-
| Information Disclosure (error messages) | Generic error messages without stack traces or internal paths. |
|
|
61
|
-
| Denial of Service (memory/CPU exhaustion) | Enforce `arrayLimit` and `parameterLimit` with safe defaults; enable `throwOnLimitExceeded`; limit nesting depth[7]. |
|
|
62
|
-
| Elevation of Privilege (prototype pollution) | Keep `allowPrototypes: false`; validate options against allowlist; use `plainObjects` to avoid prototype pollution[4][8]. |
|
|
63
|
-
|
|
64
|
-
### 7. Risk Ranking
|
|
65
|
-
|
|
66
|
-
- **High:** Denial of Service via array parsing or malformed input (historical vulnerability)
|
|
67
|
-
- **Medium:** Prototype pollution via options or input (if `allowPrototypes` enabled)
|
|
68
|
-
- **Low:** Information disclosure in errors
|
|
69
|
-
|
|
70
|
-
### 8. Next Steps & Review
|
|
71
|
-
|
|
72
|
-
1. **Audit option validation logic.**
|
|
73
|
-
2. **Add depth limiting to nested parsing and stringification.**
|
|
74
|
-
3. **Implement fuzz testing for parser and stringifier edge cases.**
|
|
75
|
-
4. **Regularly review dependencies for vulnerabilities.**
|
|
76
|
-
5. **Keep documentation and threat model up to date.**
|
|
77
|
-
6. **Ensure builtins/globals are never modified as a result of parse.**
|
|
78
|
-
7. **Support round-trip consistency between parse and stringify as a non-security goal, with the right options[5][9].**
|