Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require auth for more API endpoints #2411

Merged
merged 2 commits into from Nov 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions api_FTL.php
Expand Up @@ -19,7 +19,7 @@
$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);
Expand All @@ -32,7 +32,7 @@
}
}

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');
Expand Down Expand Up @@ -77,7 +77,7 @@
}
}

if (isset($_GET['overTimeData10mins'])) {
if (isset($_GET['overTimeData10mins']) && $auth) {
$return = callFTLAPI('overTime');
if (array_key_exists('FTLnotrunning', $return)) {
$data = array('FTLnotrunning' => true);
Expand Down