Skip to content

Commit

Permalink
Fix policykey generation.
Browse files Browse the repository at this point in the history
Improves generation by not having the number scaled up as well as
limiting result to PHP_INT_SIZE
  • Loading branch information
mrubinsk committed Dec 3, 2016
1 parent aee9494 commit 0bb58df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/ActiveSync/lib/Horde/ActiveSync/State/Base.php
Expand Up @@ -165,11 +165,11 @@ public function getCurrentSyncKey()
/**
* Generate a random 10 digit policy key
*
* @return unknown
* @return integer
*/
public function generatePolicyKey()
{
return mt_rand(1000000000, 9999999999);
return mt_rand(1000000000, mt_getrandmax());
}

/**
Expand Down

0 comments on commit 0bb58df

Please sign in to comment.