Skip to content

Commit 7179fcc

Browse files
authored
Merge pull request #2810 from willnode/patch-1
Ensure $_SERVER['SCRIPT_NAME'] ends with PHP
2 parents c3e545d + edbd927 commit 7179fcc

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]) && 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)