protected function FragmentListener::validateRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/EventListener/FragmentListener.php \Symfony\Component\HttpKernel\EventListener\FragmentListener::validateRequest()
1 call to FragmentListener::validateRequest()
- FragmentListener::onKernelRequest in vendor/
symfony/ http-kernel/ EventListener/ FragmentListener.php - Fixes request attributes when the path is '/_fragment'.
File
- vendor/
symfony/ http-kernel/ EventListener/ FragmentListener.php, line 74
Class
- FragmentListener
- Handles content fragments represented by special URIs.
Namespace
Symfony\Component\HttpKernel\EventListenerCode
protected function validateRequest(Request $request) {
// is the Request safe?
if (!$request
->isMethodSafe()) {
throw new AccessDeniedHttpException();
}
// is the Request signed?
// we cannot use $request->getUri() here as we want to work with the original URI (no query string reordering)
if ($this->signer
->check($request
->getSchemeAndHttpHost() . $request
->getBaseUrl() . $request
->getPathInfo() . (null !== ($qs = $request->server
->get('QUERY_STRING')) ? '?' . $qs : ''))) {
return;
}
throw new AccessDeniedHttpException();
}