mirror of
https://github.com/pi-hole/web.git
synced 2026-02-15 07:25:39 +00:00
Require auth for more API endpoints
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
@@ -19,7 +19,7 @@ if (isset($_GET['version'])) {
|
||||
$data['version'] = 3;
|
||||
}
|
||||
|
||||
if (isset($_GET['status'])) {
|
||||
if (isset($_GET['status']) && $auth) {
|
||||
$return = callFTLAPI('stats');
|
||||
if (array_key_exists('FTLnotrunning', $return)) {
|
||||
$data = array('FTLnotrunning' => true);
|
||||
@@ -32,7 +32,7 @@ if (isset($_GET['status'])) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET)) {
|
||||
if (isset($_GET['summary']) || isset($_GET['summaryRaw']) || !count($_GET) && $auth) {
|
||||
require_once 'scripts/pi-hole/php/gravity.php';
|
||||
|
||||
$return = callFTLAPI('stats');
|
||||
@@ -77,7 +77,7 @@ if (isset($_GET['getMaxlogage']) && $auth) {
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_GET['overTimeData10mins'])) {
|
||||
if (isset($_GET['overTimeData10mins']) && $auth) {
|
||||
$return = callFTLAPI('overTime');
|
||||
if (array_key_exists('FTLnotrunning', $return)) {
|
||||
$data = array('FTLnotrunning' => true);
|
||||
|
||||
Reference in New Issue
Block a user