From 4cb143cc0aa42a7de54964be5eaf32d38b17d1d9 Mon Sep 17 00:00:00 2001 From: Zaid Humaimidi Date: Mon, 13 Nov 2023 15:18:24 -0800 Subject: [PATCH] Encode event codes containing illegal chars --- lib/session.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/session.ts b/lib/session.ts index b6ec7c8..eac565e 100644 --- a/lib/session.ts +++ b/lib/session.ts @@ -60,6 +60,7 @@ import { } from "./types"; import { getRequestOrigin } from "./forwarded"; import * as logger from "./logger"; +import { encodeTag } from "./util"; const VALID_PARAM_TYPES = new Set([ "xsd:int", @@ -216,7 +217,7 @@ export async function inform( for (const e of rpcReq.event) { params.push([ - Path.parse(`Events.${e.replace(/\s+/g, "_")}`), + Path.parse(`Events.${encodeTag(e.replace(/\s+/g, "_"))}`), timestamp, { object: [timestamp, 0],