Skip to content

Commit

Permalink
Merge pull request #794 from Kingorgg/patch-1
Browse files Browse the repository at this point in the history
Moved $size = 32 to make genRandomNumber() more flexible in CSRF helper,
  • Loading branch information
daveismynamecom committed May 11, 2016
2 parents cb24bbe + e5151fd commit 79a089c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions system/Helpers/Csrf.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ public static function isTokenValid($name) {
* @return integer
*/

public static function genRandomNumber() {
$size = 32;
public static function genRandomNumber($size = 32) {
if (extension_loaded('openssl')) {
return openssl_random_pseudo_bytes($size);
}
Expand Down

0 comments on commit 79a089c

Please sign in to comment.