You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing a request object created via ServerRequest::fromGlobals() an incorrect signature is generated. It seems that the parameter 'oauth_signature' is unset and then re-added after adding the body contents to the params in method getSignature(). Clearing the body fixes the issue.
Possible fix:
Move the line that unsets the 'oauth_signature' parameter after the code that adds the body contents and query parameters:
publicfunction getSignature(RequestInterface$request, array$params)
{
// Add POST fields if the request uses POST fields and no filesif ($request->getHeaderLine('Content-Type') == 'application/x-www-form-urlencoded') {
$body = \GuzzleHttp\Psr7\parse_query($request->getBody()->getContents());
$params += $body;
}
// Parse & add query string parameters as base string parameters$query = $request->getUri()->getQuery();
$params += \GuzzleHttp\Psr7\parse_query($query);
// Remove oauth_signature if present// Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.")
unset($params['oauth_signature']);
The text was updated successfully, but these errors were encountered:
When passing a request object created via
ServerRequest::fromGlobals()
an incorrect signature is generated. It seems that the parameter 'oauth_signature' is unset and then re-added after adding the body contents to the params in methodgetSignature()
. Clearing the body fixes the issue.Code to reproduce the issue:
Possible fix:
Move the line that unsets the 'oauth_signature' parameter after the code that adds the body contents and query parameters:
The text was updated successfully, but these errors were encountered: