From d0365faf769ddadd0f1322d54ad3da6323bd3ebf Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 22 Jun 2019 08:39:46 +0200 Subject: [PATCH] removing exceptions - in these cases server admins can opt to disable the warning message in the configuration --- js/privatebin.js | 21 +-------------------- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index bf30a52..64663d6 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -4581,31 +4581,12 @@ jQuery.PrivateBin = (function($, RawDeflate) { if (window.isSecureContext === true || window.isSecureContext === false) { return !window.isSecureContext; } - - const url = new URL(window.location); + const url = new URL(window.location); // HTTP is obviously insecure if (url.protocol !== 'http:') { return false; } - - // filter out actually secure connections over HTTP - if ( - url.hostname.endsWith('.onion') || - url.hostname.endsWith('.i2p') - ) { - return false; - } - - // whitelist localhost for development - if ( - url.hostname === 'localhost' || - url.hostname === '127.0.0.1' - ) { - return false; - } - - // totally INSECURE http protocol! return true; } diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 1a9a161..ab39c7e 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -72,7 +72,7 @@ if ($MARKDOWN): endif; ?> - + diff --git a/tpl/page.php b/tpl/page.php index 4d8b8ba..436e013 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -50,7 +50,7 @@ if ($MARKDOWN): endif; ?> - +