From 78aa59a3172b05243bd89c701545132b2f3527de Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Fri, 10 Jan 2020 14:35:55 -0600 Subject: [PATCH 1/3] remove cache-busters from login page --- login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/login.php b/login.php index 4c76e1ad6..3a877b663 100644 --- a/login.php +++ b/login.php @@ -306,7 +306,7 @@ $theme_dark = in_array($display['theme'],['black','gray']); } } - "> + @@ -328,7 +328,7 @@ $theme_dark = in_array($display['theme'],['black','gray']); - + From 979cae1ebeb32595163e2bb4ad64a8881967d777 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Fri, 10 Jan 2020 15:33:32 -0600 Subject: [PATCH 2/3] restore empty check on $path --- plugins/dynamix/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix/template.php b/plugins/dynamix/template.php index 9193117a3..d80051fd2 100644 --- a/plugins/dynamix/template.php +++ b/plugins/dynamix/template.php @@ -46,7 +46,7 @@ foreach (glob('plugins/*', GLOB_ONLYDIR) as $plugin) { // get variables $name = $_GET['name']; $dir = $_GET['dir']; -$path = substr(explode('?', $_SERVER['REQUEST_URI'])[0], 1); +$path = empty($_GET['path']) ? substr(explode('?', $_SERVER['REQUEST_URI'])[0], 1) : $_GET['path']; // The current "task" is the first element of the path $task = strtok($path, '/'); From 5ec3b020a463820fef7577eb13a06cfbd41e3aa5 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Fri, 10 Jan 2020 20:08:01 -0600 Subject: [PATCH 3/3] allow cache-buster params on whitelisted urls in auth_request --- auth_request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_request.php b/auth_request.php index ef56f4376..cfdb3e3ec 100644 --- a/auth_request.php +++ b/auth_request.php @@ -39,7 +39,7 @@ $arrWhitelist = [ '/webGui/images/case-model.png', '/webGui/images/green-on.png' ]; -if (in_array($_SERVER['REQUEST_URI'],$arrWhitelist)) { +if (in_array(preg_replace(['/\?v=\d+/','/\?\d+/'],'',$_SERVER['REQUEST_URI']),$arrWhitelist)) { // authorized http_response_code(200); } else {