From 87979d1312f73bf625779b9886cd990349793f5c Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 4 Aug 2026 18:35:43 -0700 Subject: [PATCH] Ignore properties in the prototype chain. --- src/lib/rpc/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/rpc/index.ts b/src/lib/rpc/index.ts index 90f6e24..67e8e9b 100644 --- a/src/lib/rpc/index.ts +++ b/src/lib/rpc/index.ts @@ -95,10 +95,10 @@ export class Rpc { if (typeof action !== 'string') { throw new TypeError('RPC action must be a string') } - if (!/^[A-Za-z]+(_[A-Za-z]+)*$/.test(action)) { + if (!/^[a-z]+(_[a-z]+)*$/i.test(action)) { throw new TypeError('RPC action contains invalid characters') } - if (!(action in Schema)) { + if (!Object.hasOwn(action)) { throw new TypeError('Unknown RPC action') } } -- 2.52.0