99designs / http-signatures-php

Sign and verify PSR-7 HTTP messages in PHP.
MIT License
44 stars 32 forks source link

SigningString: use getRequestTarget not getPath & getQuery. #31

Closed pda closed 7 years ago

pda commented 7 years ago

Verifying HTTP Signatures on requests received via Symfony apps was failing when Symfony re-ordered the query string parameters (alphabetic by key).

This PR uses Psr\Http\Message\RequestInterface::getRequestTarget() (see http://www.php-fig.org/psr/psr-7/) to generate the HTTP Signatures request target instead of manually stitching together path and query, making it easier to pass the correct non-normalized request target.