summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-12-04 12:26:35 +0100
committerSimon Rettberg2018-12-04 12:26:35 +0100
commit807923563d78422f88f9a7705105cd203bc0444e (patch)
treef64c395527d71c1458f3e5e0dcc19eb3e437b849
parent[statistics] Filter malformed screen names (diff)
downloadslx-admin-807923563d78422f88f9a7705105cd203bc0444e.tar.gz
slx-admin-807923563d78422f88f9a7705105cd203bc0444e.tar.xz
slx-admin-807923563d78422f88f9a7705105cd203bc0444e.zip
[locationinfo] Prevent undefined index access
-rw-r--r--modules-available/locationinfo/inc/locationinfo.inc.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php
index 88f96d29..b996601a 100644
--- a/modules-available/locationinfo/inc/locationinfo.inc.php
+++ b/modules-available/locationinfo/inc/locationinfo.inc.php
@@ -128,11 +128,13 @@ class LocationInfo
} elseif ($row['paneltype'] === 'URL') {
// Check if we should set the insecure SSL mode (accept invalid/self signed certs etc.)
$data = json_decode($row['panelconfig'], true);
- if ($data && $data['insecure-ssl']) {
- ConfigHolder::add('SLX_BROWSER_INSECURE', '1');
- }
- if ($data && $data['reload-minutes']) {
- ConfigHolder::add('SLX_BROWSER_RELOAD_SECS', $data['reload-minutes'] * 60);
+ if (is_array($data)) {
+ if (isset($data['insecure-ssl']) && $data['insecure-ssl']) {
+ ConfigHolder::add('SLX_BROWSER_INSECURE', '1');
+ }
+ if (isset($data['reload-minutes']) && $data['reload-minutes']) {
+ ConfigHolder::add('SLX_BROWSER_RELOAD_SECS', $data['reload-minutes'] * 60);
+ }
}
}
ConfigHolder::add('SLX_BROWSER_URL', 'http://' . $_SERVER['SERVER_ADDR'] . '/panel/' . $panelUuid);