Skip to content

Commit 02fb82f

Browse files
authored
Ensure $_SERVER['SCRIPT_NAME'] ends with PHP
Solves issue #2194
1 parent c3e545d commit 02fb82f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/HTTP/IncomingRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ protected function parseRequestURI(): string
721721
$query = $parts['query'] ?? '';
722722
$uri = $parts['path'] ?? '';
723723

724-
if (isset($_SERVER['SCRIPT_NAME'][0]))
724+
if (isset($_SERVER['SCRIPT_NAME'][0]) AND pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_EXTENSION) === 'php')
725725
{
726726
// strip the script name from the beginning of the URI
727727
if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0)

0 commit comments

Comments
 (0)