aweber/AWeber-API-PHP-Library — pull request #35 by bkorty (2014-01-15 22:17:19+00:00)
Title: api find() call with + in addresses results in invalid signature

When using the find method in the PHP API, search parameters can be specified in one of two ways, as an array entry in the data parameter, or as a query param in the url parameter. When the search criteria contains a + character and is passed in as a URL query parameter, the client treats an unescaped + as a plus character when generating the OAuth signature, whereas the server treats it as an unescaped space character. As a result, the signatures do not match and the request is rejected.

This patch enforces an assumption that reserved characters are escaped when passed via the url param, but not escaped when passed via the data param. When passed via the url param, they search params will first be url decoded before the OAuth signature base is created.

Additional unit tests were also added with this patch.