fixed bug where nonce was sometimes 1 character below min

This commit is contained in:
Matt Rose
2014-05-23 00:20:15 -07:00
parent db25c00df1
commit 24d435bfa3
+1 -1
View File
@@ -392,7 +392,7 @@ class OAuthSimple {
$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;