From 276f2c1628ffef72c3d3ae489fd5b71ebb800227 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 27 Feb 2017 22:32:03 +0100 Subject: [PATCH] Allow usage of Teleporter and QueryAds backend only if a valid session is detected (#415) --- scripts/pi-hole/php/queryads.php | 3 +++ scripts/pi-hole/php/teleporter.php | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/pi-hole/php/queryads.php b/scripts/pi-hole/php/queryads.php index 457e235c..55e8f8c2 100644 --- a/scripts/pi-hole/php/queryads.php +++ b/scripts/pi-hole/php/queryads.php @@ -6,6 +6,9 @@ * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ +require "password.php"; +if(!$auth) die("Not authorized"); + ob_end_flush(); ini_set("output_buffering", "0"); ob_implicit_flush(true); diff --git a/scripts/pi-hole/php/teleporter.php b/scripts/pi-hole/php/teleporter.php index e5d9f828..02eacbfc 100644 --- a/scripts/pi-hole/php/teleporter.php +++ b/scripts/pi-hole/php/teleporter.php @@ -4,9 +4,11 @@ * Network-wide ad blocking via your own hardware. * * This file is copyright under the latest version of the EUPL. -* Please see LICENSE file for your rights under this license. */ ?> +* Please see LICENSE file for your rights under this license. */ + +require "password.php"; +if(!$auth) die("Not authorized"); -