mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-13 19:10:39 +00:00
* LINE: require webhook signatures in express handler * LINE: require webhook signatures in node handler * LINE: update express signature tests * LINE: update node signature tests * Changelog: note LINE webhook hardening * LINE: validate signatures before parsing webhook bodies * LINE: reject missing signatures before body reads
10 lines
238 B
TypeScript
10 lines
238 B
TypeScript
import type { WebhookRequestBody } from "@line/bot-sdk";
|
|
|
|
export function parseLineWebhookBody(rawBody: string): WebhookRequestBody | null {
|
|
try {
|
|
return JSON.parse(rawBody) as WebhookRequestBody;
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|