File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,9 @@ function I(i){return document.getElementById(i);}
25
25
$ protocol = (!empty ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] !== 'off ' || $ _SERVER ['SERVER_PORT ' ] == 443 ) ? "https:// " : "http:// " ;
26
26
27
27
// 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 );
35
31
array_unshift ($ servers ,
36
32
[
37
33
"name " => "This Server " ,
You can’t perform that action at this time.
0 commit comments