99designs / http-signatures-php

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

Query string ordering fix. #8

Closed pda closed 9 years ago

pda commented 9 years ago

Turns out Symfony\Component\HttpFoundation\Request getQueryString() isn't suitable for generating/verifying signing strings:

Generates the normalized query string for the Request. It builds a normalized query string, where keys/value pairs are alphabetized and have consistent escaping. — http://api.symfony.com/2.0/Symfony/Component/HttpFoundation/Request.html#method_getQueryString

I'm told by @dhotson that $request->server->get('QUERY_STRING') is probably what I want.