aboutsummaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-03-28 01:59:14 +0200
committerWojtek Kosior <koszko@koszko.org>2022-03-28 17:46:56 +0200
commit6cce03018786fe1f82014f82525770cca43808d8 (patch)
treedb5bf9a43c12ef185e51387f63cc369c3594641f /content
parentfba67f09ddedda6182d35b2fa1478115dc766905 (diff)
downloadbrowser-extension-6cce03018786fe1f82014f82525770cca43808d8.tar.gz
browser-extension-6cce03018786fe1f82014f82525770cca43808d8.zip
add more tests for CORS bypassing feature
Diffstat (limited to 'content')
-rw-r--r--content/haketilo_apis.js6
1 files changed, 3 insertions, 3 deletions
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);