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);}
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 " ,
You can’t perform that action at this time.
0 commit comments