From 6cce03018786fe1f82014f82525770cca43808d8 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 28 Mar 2022 01:59:14 +0200 Subject: add more tests for CORS bypassing feature --- content/haketilo_apis.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'content') diff --git a/content/haketilo_apis.js b/content/haketilo_apis.js index 772e843..ccfec37 100644 --- a/content/haketilo_apis.js +++ b/content/haketilo_apis.js @@ -48,9 +48,9 @@ async function on_CORS_bypass(event) { const name = "haketilo_CORS_bypass"; - console.warn("delme event", event.detail); - - if (typeof event.detail.id !== "string" || + if (typeof event.detail !== "object" || + event.detail === null || + typeof event.detail.id !== "string" || typeof event.detail.data !== "string") { console.error(`Haketilo: Invalid detail for ${name}:`, event.detail); -- cgit v1.2.3