Skip to content

Commit

Permalink
Merge pull request #21 from unknown8063/master
Browse files Browse the repository at this point in the history
Nonce is sometimes shorter than expected
  • Loading branch information
jrconlin committed May 24, 2014
2 parents db25c00 + 988203c commit 2815057
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/OAuthSimple.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ private function _getNonce($length=5)
$cLength = strlen($this->_nonce_chars);
for ($i=0; $i < $length; $i++)
{
$rnum = rand(0,$cLength);
$rnum = rand(0,$cLength - 1);
$result .= substr($this->_nonce_chars,$rnum,1);
}
$this->_parameters['oauth_nonce'] = $result;
Expand Down

0 comments on commit 2815057

Please sign in to comment.