Skip to content

Commit

Permalink
Merge pull request #25 from MarkoVcode/master
Browse files Browse the repository at this point in the history
Again update of OAuthSimple.php
  • Loading branch information
jrconlin committed Jan 13, 2015
2 parents b250946 + 258c956 commit 9d5715a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions php/OAuthSimple.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ private function _generateSignature ($parameters="")
{
$secretKey .= self::_oauthEscape($this->_secrets['oauth_secret']);
}
if(empty($parameters)){
$parameters = $this->_normalizedParameters();
if(!empty($parameters)){
$parameters = urlencode($parameters);
}
switch($this->_parameters['oauth_signature_method'])
{
Expand Down
2 changes: 1 addition & 1 deletion python/OAuthSimple/OAuthSimple.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _generateSignature(self, normParamString):
elif (self._parameters['oauth_signature_method'] == 'HMAC-SHA1'):
self.sbs = '&'.join([self._oauthEscape(self._action),
self._oauthEscape(self._path),
normParamString])
self._oauthEscape(normParamString)])
return base64.b64encode(hmac.new(secretKey,
self.sbs,
hashlib.sha1).digest())

0 comments on commit 9d5715a

Please sign in to comment.