Skip to content

Commit d661a7d

Browse files
author
Rafael Grigorian
committed
Fixed #13
1 parent 48c68ed commit d661a7d

File tree

1 file changed

+1
-1
lines changed
  • src/app/code/community/JetRails/TwoFactor/Helper

1 file changed

+1
-1
lines changed

src/app/code/community/JetRails/TwoFactor/Helper/Totp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private function secret ( $length = 16 ) {
9999
// Traverse $length times, to get random base32 encoding
100100
for ( $i = 0; $i < $length; $i++ ) {
101101
// Append a random number from base32 alphabet
102-
$secret .= $this->alphabet [ mt_rand ( 0, strlen ( $this->alphabet ) - 1 ) ];
102+
$secret .= $this->alphabet [ random_int ( 0, strlen ( $this->alphabet ) - 1 ) ];
103103
}
104104
// Return the resulting secret
105105
return $secret;

0 commit comments

Comments
 (0)