mirror of
https://github.com/unraid/webgui.git
synced 2026-03-08 03:49:53 -05:00
harden preg_replace() in auth_request.php
This commit is contained in:
@@ -39,7 +39,7 @@ $arrWhitelist = [
|
||||
'/webGui/images/case-model.png',
|
||||
'/webGui/images/green-on.png'
|
||||
];
|
||||
if (in_array(preg_replace(['/\?v=\d+/','/\?\d+/'],'',$_SERVER['REQUEST_URI']),$arrWhitelist)) {
|
||||
if (in_array(preg_replace(['/\?v=\d+$/','/\?\d+$/'],'',$_SERVER['REQUEST_URI']),$arrWhitelist)) {
|
||||
// authorized
|
||||
http_response_code(200);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user