@7h3/protocol 0.6.0 → 0.6.1
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/index.js +1 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2432,6 +2432,7 @@ async function Gn(e, t) {
|
|
|
2432
2432
|
let e = await t.replayCache.consume(n.envelope, r);
|
|
2433
2433
|
if (!e.ok) throw Error(e.reason ?? "Queue message replay detected");
|
|
2434
2434
|
}
|
|
2435
|
+
if ((typeof n.payload == "string" ? n.payload : JSON.stringify(n.payload)) !== n.envelope.body.content) throw Error("Queue message payload does not match the signed content — the payload field was modified in transit");
|
|
2435
2436
|
return {
|
|
2436
2437
|
payload: n.payload,
|
|
2437
2438
|
envelope: n.envelope
|