Because $token
refs an object, this statement will always be true. Therefore an empty oauth_token
param will be added to each request, wich will break Bitbucket authorization process.
To fix this, we need to check if token key is empty and ignore it.
This commit is contained in:
parent
6677c1da7d
commit
087cb1278f
@ -157,7 +157,7 @@ class Request implements RequestInterface
|
|||||||
'oauth_nonce' => Request::generateNonce(),
|
'oauth_nonce' => Request::generateNonce(),
|
||||||
'oauth_timestamp' => Request::generateTimestamp(),
|
'oauth_timestamp' => Request::generateTimestamp(),
|
||||||
'oauth_consumer_key' => $consumer->getKey());
|
'oauth_consumer_key' => $consumer->getKey());
|
||||||
if ($token) {
|
if ($token->getKey()) {
|
||||||
$defaults['oauth_token'] = $token->getKey();
|
$defaults['oauth_token'] = $token->getKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user