2
0

Remove Legacy OTP Secret code (#34743)

This commit is contained in:
Matt Jankowski
2025-05-20 10:51:19 -04:00
committed by GitHub
parent dab31f7a88
commit 4709121f72
6 changed files with 94 additions and 103 deletions

View File

@@ -11,17 +11,6 @@ RSpec.describe User do
it_behaves_like 'two_factor_backupable'
describe 'legacy_otp_secret' do
it 'is encrypted with OTP_SECRET environment variable' do
user = Fabricate(:user,
encrypted_otp_secret: "Fttsy7QAa0edaDfdfSz094rRLAxc8cJweDQ4BsWH/zozcdVA8o9GLqcKhn2b\nGi/V\n",
encrypted_otp_secret_iv: 'rys3THICkr60BoWC',
encrypted_otp_secret_salt: '_LMkAGvdg7a+sDIKjI3mR2Q==')
expect(user.send(:legacy_otp_secret)).to eq 'anotpsecretthatshouldbeencrypted'
end
end
describe 'otp_secret' do
it 'encrypts the saved value' do
user = Fabricate(:user, otp_secret: '123123123')