From: Chris Duncan Date: Wed, 5 Aug 2026 01:48:32 +0000 (-0700) Subject: Validate Ledger frontier block content field value type. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=48684c0724ec9175f74fe203632bae5a01f52dc2;p=libnemo.git Validate Ledger frontier block content field value type. --- diff --git a/src/lib/ledger/index.ts b/src/lib/ledger/index.ts index 508ebad..dfc1be3 100644 --- a/src/lib/ledger/index.ts +++ b/src/lib/ledger/index.ts @@ -243,7 +243,7 @@ export class Ledger { } const contents = {} as Record for (const [k, v] of Object.entries(blockInfo.contents)) { - if (Schema.block_info.contents.fields.includes(k)) { + if (Schema.block_info.contents.fields.includes(k) && typeof v === 'string') { contents[k] = v } }