Skip to content

Commit

Permalink
Merge pull request #1483 from nextcloud/fix/reduce-totp-secret-to-160…
Browse files Browse the repository at this point in the history
…-bits

fix: reduce secret size to 160 bits
  • Loading branch information
ChristophWurst authored Feb 8, 2024
2 parents 143f694 + 7eb6dc4 commit f7d34d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Service/Totp.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function hasSecret(IUser $user): bool {
}

private function generateSecret(): string {
return $this->random->generate(160, ISecureRandom::CHAR_UPPER.'234567');
return $this->random->generate(32, ISecureRandom::CHAR_UPPER.'234567');
}

/**
Expand Down

0 comments on commit f7d34d9

Please sign in to comment.