mirror of
https://github.com/laravel/laravel.git
synced 2025-02-20 11:53:14 +08:00
Changed (:any) wildcard to more restrictive.
This commit is contained in:
parent
0db0dadef7
commit
3cffaf589d
@ -55,7 +55,7 @@ class Router {
|
||||
// --------------------------------------------------------------
|
||||
// Convert the route wild-cards to regular expressions.
|
||||
// --------------------------------------------------------------
|
||||
$route = str_replace(':num', '[0-9]+', str_replace(':any', '.+', $route));
|
||||
$route = str_replace(':num', '[0-9]+', str_replace(':any', '[a-zA-Z0-9\-_]+', $route));
|
||||
|
||||
if (preg_match('#^'.$route.'$#', $method.' '.$uri))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user