Skip to content

Commit 0d7f7f8

Browse files
gr8manCopilot
andauthored
Enhance route matching with newline check
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 472ee9f commit 0d7f7f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎system/Router/Router.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ protected function checkRoutes(string $uri): bool
455455
// PCRE call for static routes.
456456
$isRegex = strpbrk($routeKey, '()[]?*+{}^$\\.|#') !== false;
457457

458-
if (! $isRegex) {
458+
if (! $isRegex && ! str_ends_with($uri, "\n")) {
459459
if ($routeKey !== $uri) {
460460
continue;
461461
}

0 commit comments

Comments
 (0)