Skip to content

Commit

Permalink
fixed bug where nonce was sometimes 1 character below min
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Rose committed May 23, 2014
1 parent db25c00 commit 24d435b
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 24d435b

Please sign in to comment.