Compare commits
No commits in common. "d504f1d5bb987e47340a4ad69af2ca0d4059c099" and "ee7d9623a37d2ae3b0dfa9ef04915914a40f1d5b" have entirely different histories.
d504f1d5bb
...
ee7d9623a3
@ -170,7 +170,7 @@ class HttpResponse
|
||||
$this->request->session()->set('redirect_after_login', $this->rawUrl);
|
||||
$response = new Redirect(
|
||||
$this->routeCollection->getRoute($this->appConfig['loginRouteId'])
|
||||
->generateLink(['redirect_after_login' => $this->rawUrl]),
|
||||
->generateLink(['redirect_after_login' => urlencode($this->rawUrl)]),
|
||||
IRedirect::TEMPORARY);
|
||||
header('Location: ' . $this->getRedirectUrl($response), true, $response->getHttpCode());
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class Route implements IRoute
|
||||
foreach ($this->pattern as $fragment) {
|
||||
if (preg_match('/^{(\\w+)(\\?)?}$/', $fragment, $matches) === 1) {
|
||||
if (isset($parameters[$matches[1]])) {
|
||||
$link[] = rawurlencode($parameters[$matches[1]]);
|
||||
$link[] = $parameters[$matches[1]];
|
||||
unset($parameters[$matches[1]]);
|
||||
} elseif (!isset($matches[2])) {//TODO: why? parameter not found but not optional
|
||||
$link[] = $fragment;
|
||||
@ -53,7 +53,7 @@ class Route implements IRoute
|
||||
$queryParams[$key] = $value;
|
||||
}
|
||||
|
||||
$query = count($queryParams) > 0 ? '?' . http_build_query($queryParams, encoding_type: PHP_QUERY_RFC3986) : '';
|
||||
$query = count($queryParams) > 0 ? '?' . http_build_query($queryParams) : '';
|
||||
|
||||
return '/' . implode('/', $link) . $query;
|
||||
}
|
||||
@ -64,7 +64,7 @@ class Route implements IRoute
|
||||
|
||||
foreach ($path as $i => $fragment) {
|
||||
if (preg_match('/^{(\\w+)(?:\\?)?}$/', $this->pattern[$i], $matches) === 1) {
|
||||
$parameters[$matches[1]] = rawurldecode($fragment);
|
||||
$parameters[$matches[1]] = $fragment;
|
||||
} elseif ($fragment != $this->pattern[$i]) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user