From f761b8e4288f8de9dca8af3fa37351384aff4799 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sun, 2 Aug 2026 23:44:23 -0700 Subject: [PATCH] Validate block hash processing response. --- src/lib/block/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/block/index.ts b/src/lib/block/index.ts index ed5e453..07c6c4a 100644 --- a/src/lib/block/index.ts +++ b/src/lib/block/index.ts @@ -210,7 +210,7 @@ export class Block { block: this.toJSON() } const res = await rpc.post('process', data) - if (res.hash == null) { + if (res == null || typeof res !== 'object' || !('hash' in res) || typeof res.hash !== 'string') { throw new Error('Block could not be processed', { cause: res }) } return res.hash -- 2.52.0