cborg 1.9.5 → 1.10.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/README.md CHANGED
@@ -247,6 +247,7 @@ Decode valid CBOR bytes from a `Uint8Array` (or `Buffer`) and return a JavaScrip
247
247
  * `strict` (boolean, default `false`): when decoding integers, including for lengths (arrays, maps, strings, bytes), values will be checked to see whether they were encoded in their smallest possible form. If not, an error will be thrown.
248
248
  * Currently, this form of deterministic strictness cannot be enforced for float representations, or map key ordering (pull requests _very_ welcome).
249
249
  * `useMaps` (boolean, default `false`): when decoding major 5 (map) entries, use a `Map` rather than a plain `Object`. This will nest for any encountered map. During encode, a `Map` will be interpreted as an `Object` and will round-trip as such unless `useMaps` is supplied, in which case, all `Map`s and `Object`s will round-trip as `Map`s. There is no way to retain the distinction during round-trip without using a custom tag.
250
+ * `rejectDuplicateMapKeys` (boolean, default `false`): when the decoder encounters duplicate keys for the same map, an error will be thrown when this option is set. This is an additional _strictness_ option, disallowing data-hiding and reducing the number of same-data different-bytes possibilities where it matters.
250
251
  * `retainStringBytes` (boolean, default `false`): when decoding strings, retain the original bytes on the `Token` object as `byteValue`. Since it is possible to encode non-UTF-8 characters in strings in CBOR, and JavaScript doesn't properly handle non-UTF-8 in its conversion from bytes (`TextEncoder` or `Buffer`), this can result in a loss of data (and an inability to round-trip). Where this is important, a token stream should be consumed instead of a plain `decode()` and the `byteValue` property on string tokens can be inspected (see [lib/diagnostic.js](lib/diagnostic.js) for an example of its use.)
251
252
  * `tags` (array): a mapping of tag number to tag decoder function. By default no tags are supported. See [Tag decoders](#tag-decoders).
252
253
  * `tokenizer` (object): an object with two methods, `next()` which returns a `Token` and `done()` which returns a `boolean`. Can be used to implement custom input decoding. See the source code for examples.
@@ -63,4 +63,15 @@ describe('decode errors', () => {
63
63
  it('too many terminals', () => {
64
64
  assert.throws(() => decode.decode(byteUtils.fromHex('0101')), /too many terminals/);
65
65
  });
66
+ it('rejectDuplicateMapKeys enabled on duplicate keys', () => {
67
+ assert.deepStrictEqual(decode.decode(byteUtils.fromHex('a3636261720363666f6f0163666f6f02')), {
68
+ foo: 2,
69
+ bar: 3
70
+ });
71
+ assert.throws(() => decode.decode(byteUtils.fromHex('a3636261720363666f6f0163666f6f02'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/);
72
+ assert.throws(() => decode.decode(byteUtils.fromHex('a3636261720363666f6f0163666f6f02'), {
73
+ useMaps: true,
74
+ rejectDuplicateMapKeys: true
75
+ }), /CBOR decode error: found repeat map key "foo"/);
76
+ });
66
77
  });
@@ -274,4 +274,8 @@ describe('json basics', () => {
274
274
  chai.assert.throws(() => decode.decode(toBytes('[fa]')), 'CBOR decode error: unexpected end of input at position 1');
275
275
  chai.assert.throws(() => decode.decode(toBytes('-0..1')), 'CBOR decode error: unexpected token at position 3');
276
276
  });
277
+ it('should throw when rejectDuplicateMapKeys enabled on duplicate keys', () => {
278
+ chai.assert.deepStrictEqual(decode.decode(toBytes('{"foo":1,"foo":2}')), { foo: 2 });
279
+ chai.assert.throws(() => decode.decode(toBytes('{"foo":1,"foo":2}'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/);
280
+ });
277
281
  });
package/cjs/lib/decode.js CHANGED
@@ -73,6 +73,11 @@ function tokenToMap(token, tokeniser, options) {
73
73
  if (useMaps !== true && typeof key !== 'string') {
74
74
  throw new Error(`${ common.decodeErrPrefix } non-string keys not supported (got ${ typeof key })`);
75
75
  }
76
+ if (options.rejectDuplicateMapKeys === true) {
77
+ if (useMaps && m.has(key) || !useMaps && key in obj) {
78
+ throw new Error(`${ common.decodeErrPrefix } found repeat map key "${ key }"`);
79
+ }
80
+ }
76
81
  const value = tokensToObject(tokeniser, options);
77
82
  if (value === DONE) {
78
83
  throw new Error(`${ common.decodeErrPrefix } found map but not enough entries (got ${ i } [no value], expected ${ token.value })`);
@@ -63,4 +63,15 @@ describe('decode errors', () => {
63
63
  it('too many terminals', () => {
64
64
  assert.throws(() => decode.decode(byteUtils.fromHex('0101')), /too many terminals/);
65
65
  });
66
+ it('rejectDuplicateMapKeys enabled on duplicate keys', () => {
67
+ assert.deepStrictEqual(decode.decode(byteUtils.fromHex('a3636261720363666f6f0163666f6f02')), {
68
+ foo: 2,
69
+ bar: 3
70
+ });
71
+ assert.throws(() => decode.decode(byteUtils.fromHex('a3636261720363666f6f0163666f6f02'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/);
72
+ assert.throws(() => decode.decode(byteUtils.fromHex('a3636261720363666f6f0163666f6f02'), {
73
+ useMaps: true,
74
+ rejectDuplicateMapKeys: true
75
+ }), /CBOR decode error: found repeat map key "foo"/);
76
+ });
66
77
  });
@@ -274,4 +274,8 @@ describe('json basics', () => {
274
274
  chai.assert.throws(() => decode.decode(toBytes('[fa]')), 'CBOR decode error: unexpected end of input at position 1');
275
275
  chai.assert.throws(() => decode.decode(toBytes('-0..1')), 'CBOR decode error: unexpected token at position 3');
276
276
  });
277
+ it('should throw when rejectDuplicateMapKeys enabled on duplicate keys', () => {
278
+ chai.assert.deepStrictEqual(decode.decode(toBytes('{"foo":1,"foo":2}')), { foo: 2 });
279
+ chai.assert.throws(() => decode.decode(toBytes('{"foo":1,"foo":2}'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/);
280
+ });
277
281
  });
@@ -55,4 +55,15 @@ describe('decode errors', () => {
55
55
  it('too many terminals', () => {
56
56
  assert.throws(() => decode(fromHex('0101')), /too many terminals/);
57
57
  });
58
+ it('rejectDuplicateMapKeys enabled on duplicate keys', () => {
59
+ assert.deepStrictEqual(decode(fromHex('a3636261720363666f6f0163666f6f02')), {
60
+ foo: 2,
61
+ bar: 3
62
+ });
63
+ assert.throws(() => decode(fromHex('a3636261720363666f6f0163666f6f02'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/);
64
+ assert.throws(() => decode(fromHex('a3636261720363666f6f0163666f6f02'), {
65
+ useMaps: true,
66
+ rejectDuplicateMapKeys: true
67
+ }), /CBOR decode error: found repeat map key "foo"/);
68
+ });
58
69
  });
@@ -272,4 +272,8 @@ describe('json basics', () => {
272
272
  assert.throws(() => decode(toBytes('[fa]')), 'CBOR decode error: unexpected end of input at position 1');
273
273
  assert.throws(() => decode(toBytes('-0..1')), 'CBOR decode error: unexpected token at position 3');
274
274
  });
275
+ it('should throw when rejectDuplicateMapKeys enabled on duplicate keys', () => {
276
+ assert.deepStrictEqual(decode(toBytes('{"foo":1,"foo":2}')), { foo: 2 });
277
+ assert.throws(() => decode(toBytes('{"foo":1,"foo":2}'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/);
278
+ });
275
279
  });
package/esm/lib/decode.js CHANGED
@@ -71,6 +71,11 @@ function tokenToMap(token, tokeniser, options) {
71
71
  if (useMaps !== true && typeof key !== 'string') {
72
72
  throw new Error(`${ decodeErrPrefix } non-string keys not supported (got ${ typeof key })`);
73
73
  }
74
+ if (options.rejectDuplicateMapKeys === true) {
75
+ if (useMaps && m.has(key) || !useMaps && key in obj) {
76
+ throw new Error(`${ decodeErrPrefix } found repeat map key "${ key }"`);
77
+ }
78
+ }
74
79
  const value = tokensToObject(tokeniser, options);
75
80
  if (value === DONE) {
76
81
  throw new Error(`${ decodeErrPrefix } found map but not enough entries (got ${ i } [no value], expected ${ token.value })`);
@@ -55,4 +55,15 @@ describe('decode errors', () => {
55
55
  it('too many terminals', () => {
56
56
  assert.throws(() => decode(fromHex('0101')), /too many terminals/);
57
57
  });
58
+ it('rejectDuplicateMapKeys enabled on duplicate keys', () => {
59
+ assert.deepStrictEqual(decode(fromHex('a3636261720363666f6f0163666f6f02')), {
60
+ foo: 2,
61
+ bar: 3
62
+ });
63
+ assert.throws(() => decode(fromHex('a3636261720363666f6f0163666f6f02'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/);
64
+ assert.throws(() => decode(fromHex('a3636261720363666f6f0163666f6f02'), {
65
+ useMaps: true,
66
+ rejectDuplicateMapKeys: true
67
+ }), /CBOR decode error: found repeat map key "foo"/);
68
+ });
58
69
  });
@@ -272,4 +272,8 @@ describe('json basics', () => {
272
272
  assert.throws(() => decode(toBytes('[fa]')), 'CBOR decode error: unexpected end of input at position 1');
273
273
  assert.throws(() => decode(toBytes('-0..1')), 'CBOR decode error: unexpected token at position 3');
274
274
  });
275
+ it('should throw when rejectDuplicateMapKeys enabled on duplicate keys', () => {
276
+ assert.deepStrictEqual(decode(toBytes('{"foo":1,"foo":2}')), { foo: 2 });
277
+ assert.throws(() => decode(toBytes('{"foo":1,"foo":2}'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/);
278
+ });
275
279
  });
package/interface.ts CHANGED
@@ -40,6 +40,7 @@ export interface DecodeOptions {
40
40
  allowBigInt?: boolean
41
41
  strict?: boolean
42
42
  useMaps?: boolean
43
+ rejectDuplicateMapKeys?: boolean
43
44
  retainStringBytes?: boolean
44
45
  tags?: TagDecoder[],
45
46
  tokenizer?: DecodeTokenizer
package/lib/decode.js CHANGED
@@ -105,6 +105,12 @@ function tokenToMap (token, tokeniser, options) {
105
105
  if (useMaps !== true && typeof key !== 'string') {
106
106
  throw new Error(`${decodeErrPrefix} non-string keys not supported (got ${typeof key})`)
107
107
  }
108
+ if (options.rejectDuplicateMapKeys === true) {
109
+ // @ts-ignore
110
+ if ((useMaps && m.has(key)) || (!useMaps && (key in obj))) {
111
+ throw new Error(`${decodeErrPrefix} found repeat map key "${key}"`)
112
+ }
113
+ }
108
114
  const value = tokensToObject(tokeniser, options)
109
115
  if (value === DONE) {
110
116
  throw new Error(`${decodeErrPrefix} found map but not enough entries (got ${i} [no value], expected ${token.value})`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cborg",
3
- "version": "1.9.5",
3
+ "version": "1.10.0",
4
4
  "description": "Fast CBOR with a focus on strictness",
5
5
  "main": "./cjs/cborg.js",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  "mocha": "^10.0.0",
40
40
  "polendina": "~3.1.0",
41
41
  "standard": "^17.0.0",
42
- "typescript": "~4.8.2"
42
+ "typescript": "~4.9.3"
43
43
  },
44
44
  "exports": {
45
45
  ".": {
@@ -56,4 +56,10 @@ describe('decode errors', () => {
56
56
  // two '1's
57
57
  assert.throws(() => decode(fromHex('0101')), /too many terminals/)
58
58
  })
59
+
60
+ it('rejectDuplicateMapKeys enabled on duplicate keys', () => {
61
+ assert.deepStrictEqual(decode(fromHex('a3636261720363666f6f0163666f6f02')), { foo: 2, bar: 3 })
62
+ assert.throws(() => decode(fromHex('a3636261720363666f6f0163666f6f02'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/)
63
+ assert.throws(() => decode(fromHex('a3636261720363666f6f0163666f6f02'), { useMaps: true, rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/)
64
+ })
59
65
  })
package/test/test-json.js CHANGED
@@ -183,4 +183,9 @@ describe('json basics', () => {
183
183
  assert.throws(() => decode(toBytes('[fa]')), 'CBOR decode error: unexpected end of input at position 1')
184
184
  assert.throws(() => decode(toBytes('-0..1')), 'CBOR decode error: unexpected token at position 3')
185
185
  })
186
+
187
+ it('should throw when rejectDuplicateMapKeys enabled on duplicate keys', () => {
188
+ assert.deepStrictEqual(decode(toBytes('{"foo":1,"foo":2}')), { foo: 2 })
189
+ assert.throws(() => decode(toBytes('{"foo":1,"foo":2}'), { rejectDuplicateMapKeys: true }), /CBOR decode error: found repeat map key "foo"/)
190
+ })
186
191
  })
@@ -1,25 +1,25 @@
1
1
  import { Token } from './lib/token';
2
2
  import { Bl } from './lib/bl';
3
- export declare type TokenOrNestedTokens = Token | Token[] | TokenOrNestedTokens[];
3
+ export type TokenOrNestedTokens = Token | Token[] | TokenOrNestedTokens[];
4
4
  export interface Reference {
5
5
  parent: Reference | undefined;
6
6
  obj: object | any[];
7
7
  includes(obj: object | any[]): boolean;
8
8
  }
9
- export declare type OptionalTypeEncoder = (data: any, typ: string, options: EncodeOptions, refStack?: Reference) => TokenOrNestedTokens | null;
10
- export declare type StrictTypeEncoder = (data: any, typ: string, options: EncodeOptions, refStack?: Reference) => TokenOrNestedTokens;
11
- export declare type TokenTypeEncoder = {
9
+ export type OptionalTypeEncoder = (data: any, typ: string, options: EncodeOptions, refStack?: Reference) => TokenOrNestedTokens | null;
10
+ export type StrictTypeEncoder = (data: any, typ: string, options: EncodeOptions, refStack?: Reference) => TokenOrNestedTokens;
11
+ export type TokenTypeEncoder = {
12
12
  (buf: Bl, token: Token, options?: EncodeOptions): void;
13
13
  compareTokens(t1: Token, t2: Token): number;
14
14
  encodedSize?(token: Token, options?: EncodeOptions): number;
15
15
  };
16
- export declare type MapSorter = (e1: (Token | Token[])[], e2: (Token | Token[])[]) => number;
17
- export declare type QuickEncodeToken = (token: Token) => Uint8Array | undefined;
16
+ export type MapSorter = (e1: (Token | Token[])[], e2: (Token | Token[])[]) => number;
17
+ export type QuickEncodeToken = (token: Token) => Uint8Array | undefined;
18
18
  export interface DecodeTokenizer {
19
19
  done(): boolean;
20
20
  next(): Token;
21
21
  }
22
- export declare type TagDecoder = (inner: any) => any;
22
+ export type TagDecoder = (inner: any) => any;
23
23
  export interface DecodeOptions {
24
24
  allowIndefinite?: boolean;
25
25
  allowUndefined?: boolean;
@@ -29,6 +29,7 @@ export interface DecodeOptions {
29
29
  allowBigInt?: boolean;
30
30
  strict?: boolean;
31
31
  useMaps?: boolean;
32
+ rejectDuplicateMapKeys?: boolean;
32
33
  retainStringBytes?: boolean;
33
34
  tags?: TagDecoder[];
34
35
  tokenizer?: DecodeTokenizer;
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAA;AAE7B,oBAAY,mBAAmB,GAAG,KAAK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AAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,eAAe,CAAA;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,YAAY,CAAC,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB,CAAA;KAAE,CAAA;CAC3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../lib/decode.js"],"names":[],"mappings":"oBAKa,OAAO,YAAY,EAAE,KAAK;4BAC1B,OAAO,cAAc,EAAE,aAAa;8BACpC,OAAO,cAAc,EAAE,eAAe;AAUnD;;GAEG;AACH;IACE;;;OAGG;IACH,kBAHW,UAAU,YACV,aAAa,EAMvB;IAHC,YAAY;IACZ,iBAAgB;IAChB,8CAAsB;IAGxB,gBAEC;IAED,mCAgBC;CACF;AAuED;;;;GAIG;AACH,0CAJW,eAAe,WACf,aAAa,GACX,GAAG,6BAAW,CAoC1B;AAED;;;;GAIG;AACH,6BAJW,UAAU,+DAER,GAAG,CAmBf;AAnID,mCAAiC;AADjC,kCAA+B"}
1
+ {"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../lib/decode.js"],"names":[],"mappings":"oBAKa,OAAO,YAAY,EAAE,KAAK;4BAC1B,OAAO,cAAc,EAAE,aAAa;8BACpC,OAAO,cAAc,EAAE,eAAe;AAUnD;;GAEG;AACH;IACE;;;OAGG;IACH,kBAHW,UAAU,YACV,aAAa,EAMvB;IAHC,YAAY;IACZ,iBAAgB;IAChB,8CAAsB;IAGxB,gBAEC;IAED,mCAgBC;CACF;AA6ED;;;;GAIG;AACH,0CAJW,eAAe,WACf,aAAa,GACX,GAAG,6BAAW,CAoC1B;AAED;;;;GAIG;AACH,6BAJW,UAAU,+DAER,GAAG,CAmBf;AAzID,mCAAiC;AADjC,kCAA+B"}