Commit 479702e0 authored by Kevin Ditscheid's avatar Kevin Ditscheid

[BUGFIX] Decode urls to properly compare them

parent 4ab35d03
......@@ -145,14 +145,14 @@ class RoutingService {
$requestUri .= '?' . $requestParameters;
}
if (preg_match($pattern, $requestUri)) {
$redirectUri = preg_replace($pattern, $redirect['destination_url'], $requestUri) .
if (preg_match($pattern, \rawurldecode($requestUri))) {
$redirectUri = preg_replace($pattern, $redirect['destination_url'], \rawurldecode($requestUri)) .
$appendParameters;
$this->logRedirect($redirect, $requestUri, $redirectUri, $start, microtime(TRUE));
$this->logRedirect($redirect, \rawurldecode($requestUri), $redirectUri, $start, microtime(TRUE));
header('Location: ' . $redirectUri, TRUE, $redirect['redirect_code']);
exit();
}
} elseif ($requestUri === $trimmedSourceUrl) {
} elseif (\rawurldecode($requestUri) === $trimmedSourceUrl) {
$destinationUrl = $redirect['destination_url'];
if (strpos($destinationUrl, self::URL_WIZARD_ID) === 0) {
$destinationUrl = (int) substr($destinationUrl, 14);
......@@ -165,7 +165,7 @@ class RoutingService {
$redirectUri = $destinationUrl . $appendParameters;
}
$this->logRedirect($redirect, $requestUri, $redirectUri, $start, microtime(TRUE));
$this->logRedirect($redirect, \rawurldecode($requestUri), $redirectUri, $start, microtime(TRUE));
header('Location: ' . $redirectUri, TRUE, $redirect['redirect_code']);
exit();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment