@openlfcp/wire 0.4.0 → 0.5.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/dist/message.js +6 -1
- package/package.json +3 -3
package/dist/message.js
CHANGED
|
@@ -371,7 +371,12 @@ const CODECS = {
|
|
|
371
371
|
CONTROL_GET: {
|
|
372
372
|
decode(value) {
|
|
373
373
|
const f = new Fields(value, "control-get-body", [0, 1, 2]);
|
|
374
|
-
|
|
374
|
+
const start = f.uint(1);
|
|
375
|
+
const end = f.uint(2);
|
|
376
|
+
// §45: a range whose end is below its start is MALFORMED_MESSAGE.
|
|
377
|
+
if (end < start)
|
|
378
|
+
invalid("control-get-body", "the range's end is below its start (§45)");
|
|
379
|
+
return Object.freeze({ resourceId: rid(f, 0), start, end });
|
|
375
380
|
},
|
|
376
381
|
encode: (b) => map([
|
|
377
382
|
[0, b.resourceId],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openlfcp/wire",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Deterministic CBOR, COSE and LFCP Wire structures and codecs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openlfcp",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"tag": "latest"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@openlfcp/core": "^0.
|
|
51
|
-
"@openlfcp/crypto": "^0.
|
|
50
|
+
"@openlfcp/core": "^0.5.0",
|
|
51
|
+
"@openlfcp/crypto": "^0.5.0"
|
|
52
52
|
}
|
|
53
53
|
}
|