Encode event codes containing illegal chars

This commit is contained in:
Zaid Humaimidi committed 2023-11-13 15:18:24 -08:00
1 parent 8d11e1cdd9
commit 4cb143cc0a
1 file changed
+2 -1
+2 -1
View File
@@ -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],