Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bergware
2020-01-12 08:00:56 +01:00
3 changed files with 4 additions and 4 deletions

View File

@@ -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 {

View File

@@ -306,7 +306,7 @@ $theme_dark = in_array($display['theme'],['black','gray']);
}
}
</style>
<link type="text/css" rel="stylesheet" href="<?autov("/webGui/styles/default-cases.css")?>">
<link type="text/css" rel="stylesheet" href="/webGui/styles/default-cases.css">
<link type="image/png" rel="shortcut icon" href="/webGui/images/green-on.png">
</head>
@@ -328,7 +328,7 @@ $theme_dark = in_array($display['theme'],['black','gray']);
<?if (substr($mycase,-4)!='.png'):?>
<span class='case-<?=$mycase?>'></span>
<?else:?>
<img src='<?=autov("/webGui/images/$mycase")?>'>
<img src="/webGui/images/<?=$mycase?>">
<?endif;?>
<?else:?>
<span class='case-define-r5'></span>

View File

@@ -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, '/');