8000 [Security] use current request attributes to generate redirect url? by jfsimon · Pull Request #7325 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Security] use current request attributes to generate redirect url? #7325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
[Security] use current request attributes to generate redirect url
  • Loading branch information
jfsimon committed Mar 11, 2013
commit a263d969b438495afdcdc436be0d5cf007cc0709
6 changes: 3 additions & 3 deletions src/Symfony/Component/Security/Http/HttpUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ public function generateUri($request, $path)
return $request->getUriForPath($path);
}

return $this->generateUrl($path, true);
return $this->generateUrl($path, $request->attributes->all(), true);
}

private function generateUrl($route, $absolute = false)
private function generateUrl($route, array $attributes = array(), $absolute = false)
{
if (null === $this->urlGenerator) {
throw new \LogicException('You must provide a UrlGeneratorInterface instance to be able to use routes.');
}

return $this->urlGenerator->generate($route, array(), $absolute);
return $this->urlGenerator->generate($route, $attributes, $absolute);
}
}
0