Skip to content

Commit

Permalink
[HttpKernel] fixed internal fragment handling
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 3, 2014
1 parent b60b5d4 commit 23eb033
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -16,6 +16,7 @@
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\HttpKernel\UriSigner;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
Expand All @@ -24,8 +25,8 @@
* All URL paths starting with /_fragment are handled as
* content fragments by this listener.
*
* If the request does not come from a trusted IP, it throws an
* AccessDeniedHttpException exception.
* If throws an AccessDeniedHttpException exception if the request
* is not signed or if it is not an internal sub-request.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
Expand Down Expand Up @@ -61,7 +62,9 @@ public function onKernelRequest(GetResponseEvent $event)
return;
}

$this->validateRequest($request);
if (HttpKernelInterface::MASTER_REQUEST === $event->getRequestType()) {
$this->validateRequest($request);
}

parse_str($request->query->get('_path', ''), $attributes);
$request->attributes->add($attributes);
Expand Down

0 comments on commit 23eb033

Please sign in to comment.