symfony/symfony — pull request #12574 by nyroDev (2014-11-25 16:40:50+00:00)
Title: [HttpKernel] Fix UriSigner::check when _hash is not at the end of the uri

Q | A
--- | ---
Bug fix | yes
Feature addition | no
Backwards compatibility break | no
Symfony2 tests pass | yes
Fixes the following tickets | -
Todo | -
License of the code | MIT
Documentation PR | -

I have a weird server installation behind Varnish that rewrite the signed URL to add the _hash at the end of the url queries.
Exemple :
URL called: http://exemple.com/page?foo=bar&_hash=123
URL received by PHP: http://exemple.com/page?_hash=123&foo=bar

When the _hash is not at the end of the URL, the UriSigner fail to verify it even if the _hash is correct.

The fix rewrites the check function to use parse_url and parse_str to analyse the URI and check the signature.