mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix subtle error in Regex matching URI scheme.
[+-.] will match plus, hyphen, and dot, but also comma. Use [+\-.] since commas not allowed in URI scheme.
This commit is contained in:
parent
2fd36bdedc
commit
1ff77f2363
1 changed files with 1 additions and 1 deletions
|
@ -888,7 +888,7 @@ class Router {
|
|||
$output .= Inflector::underscore($params['controller']) . '/' . $url;
|
||||
}
|
||||
}
|
||||
$protocol = preg_match('#^[a-z][a-z0-9+-.]*\://#i', $output);
|
||||
$protocol = preg_match('#^[a-z][a-z0-9+\-.]*\://#i', $output);
|
||||
if ($protocol === 0) {
|
||||
$output = str_replace('//', '/', $base . '/' . $output);
|
||||
|
||||
|
|
Loading…
Reference in a new issue