Skip to content

Commit

Permalink
fix: resolve input decoding issue in server.ts
Browse files Browse the repository at this point in the history
Replaced ctx.req.json() with body in input decoding to ensure valid input handling.
  • Loading branch information
gentlementlegen committed Nov 5, 2024
1 parent f30dbb5 commit fe99961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sdk/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function createPlugin<TConfig = unknown, TEnv = unknown, TSupportedEvents
console.dir(inputSchemaErrors, { depth: null });
throw new HTTPException(400, { message: "Invalid body" });
}
const inputs = Value.Decode(inputSchema, await ctx.req.json());
const inputs = Value.Decode(inputSchema, body);
const signature = inputs.signature;
if (!(await verifySignature(pluginOptions.kernelPublicKey, inputs, signature))) {
throw new HTTPException(400, { message: "Invalid signature" });
Expand Down

0 comments on commit fe99961

Please sign in to comment.