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:
@@ -3548,7 +3548,8 @@ describe UsersController do
|
||||
|
||||
response_body = JSON.parse(response.body)
|
||||
|
||||
expect(response_body['backup_codes'].length).to be(10)
|
||||
# we use SecureRandom.hex(16) for backup codes, ensure this continues to be the case
|
||||
expect(response_body['backup_codes'].map(&:length)).to eq([32] * 10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user