From 98b0f0f8badb4bf36dec69f41435143fab48d31d Mon Sep 17 00:00:00 2001 From: teromene Date: Thu, 12 Oct 2017 17:14:34 +0100 Subject: [PATCH] [Core] Verify the presence of the array keys before accessing them. Fixes #588 --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index ec4007f2..799980b5 100644 --- a/index.php +++ b/index.php @@ -132,8 +132,8 @@ try { $whitelist_selection = array_map('strtolower', $whitelist_selection); } - $action = $params['action']; - $bridge = $params['bridge']; + $action = array_key_exists('action', $params) ? $params['action'] : null; + $bridge = array_key_exists('bridge', $params) ? $params['bridge'] : null; if($action === 'display' && !empty($bridge)) { // DEPRECATED: 'nameBridge' scheme is replaced by 'name' in bridge parameter values @@ -160,7 +160,7 @@ try { // Data retrieval $bridge = Bridge::create($bridge); - $noproxy = filter_var($params['_noproxy'], FILTER_VALIDATE_BOOLEAN); + $noproxy = array_key_exists('_noproxy', $params) && filter_var($params['_noproxy'], FILTER_VALIDATE_BOOLEAN); if(defined('PROXY_URL') && PROXY_BYBRIDGE && $noproxy) { define('NOPROXY', true); }