From dddee16ee544a72752613e8c2ec3573a8bdee594 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Jakse?= Date: Tue, 27 Oct 2020 08:20:57 +0100 Subject: [PATCH] fix disableCSP --- public/trivabble.js | 6 +++--- server/trivabble-server.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/trivabble.js b/public/trivabble.js index 3249d8c..e61fd1d 100644 --- a/public/trivabble.js +++ b/public/trivabble.js @@ -2102,9 +2102,9 @@ } else { myPrompt( _("It seems your did not give your name. You need to do it for the game to run properly."), - function (name) { - if (name && name.trim()) { - setSetting("PlayerName", name.trim()); + function (newName) { + if (newName && newName.trim()) { + setSetting("PlayerName", newName.trim()); } repromptName(f); diff --git a/server/trivabble-server.js b/server/trivabble-server.js index b90b559..a5b19a2 100644 --- a/server/trivabble-server.js +++ b/server/trivabble-server.js @@ -1009,7 +1009,7 @@ function handleRequest(request, response) { "script-src 'self'; " + "style-src 'self'; " + "img-src 'self'; " + - (disableCSP ? "" : "connect-src 'self' " + ( + (disableCSP ? "connect-src *; " : "connect-src 'self' " + ( // uzbl (like Safari 9 / iPad 2) does not like insecure websockets on the // same port with connect-src 'self' // See https://github.com/w3c/webappsec-csp/issues/7 -- 2.30.2