mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 14:28:53 +02:00
Merge remote-tracking branch 'origin/support/3.2' into develop
This commit is contained in:
@@ -404,8 +404,16 @@ class Request
|
||||
$server['PHP_AUTH_PW'] = $components['pass'];
|
||||
}
|
||||
|
||||
if (!isset($components['path'])) {
|
||||
if ('' === $path = $components['path'] ?? '') {
|
||||
$components['path'] = '/';
|
||||
} elseif (!isset($components['scheme']) && !isset($components['host']) && '/' !== $path[0]) {
|
||||
if (false !== $pos = strpos($path, '/')) {
|
||||
$path = substr($path, 0, $pos);
|
||||
}
|
||||
|
||||
if (str_contains($path, ':')) {
|
||||
throw new BadRequestException('Invalid URI: Path is malformed.');
|
||||
}
|
||||
}
|
||||
|
||||
switch (strtoupper($method)) {
|
||||
|
||||
Reference in New Issue
Block a user