mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: increase the length of backup codes
16 ^ 8 though not tiny but is a workable search space in the event of breach, 16 ^ 16 is not.
This commit is contained in:
@@ -191,7 +191,7 @@ module SecondFactorManager
|
||||
def generate_backup_codes
|
||||
codes = []
|
||||
10.times do
|
||||
codes << SecureRandom.hex(8)
|
||||
codes << SecureRandom.hex(16)
|
||||
end
|
||||
|
||||
codes_json = codes.map do |code|
|
||||
|
||||
Reference in New Issue
Block a user