Skip to content

Commit 6d31010

Browse files
Update docker/ui.php
Co-authored-by: qodo-merge-pro-for-open-source[bot] <189517486+qodo-merge-pro-for-open-source[bot]@users.noreply.github.com>
1 parent 0274f6e commit 6d31010

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

docker/ui.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@ function I(i){return document.getElementById(i);}
2525
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
2626

2727
// Retrieve the host (e.g., www.example.com)
28-
$host = $_SERVER['HTTP_HOST'];
29-
30-
// Retrieve the URI (path and query string)
31-
$uri = $_SERVER['REQUEST_URI'];
32-
33-
// Combine them to get the full URL
34-
$url = $protocol . $host . $uri;
28+
$host = filter_var($_SERVER['HTTP_HOST'], FILTER_SANITIZE_STRING);
29+
$uri = filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
30+
$url = $protocol . htmlspecialchars($host) . htmlspecialchars($uri);
3531
array_unshift($servers,
3632
[
3733
"name"=> "This Server",

0 commit comments

Comments
 (0)