From c02fc235030be3dfd8546101615ab35c2e51ac45 Mon Sep 17 00:00:00 2001 From: Charl Matthee Date: Thu, 8 Aug 2019 13:20:55 +0200 Subject: [PATCH] Added explicit truncation of the IV because of https://github.com/attr-encrypted/encryptor/issues/26. --- .../models/two_factor_authenticatable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/two_factor_authentication/models/two_factor_authenticatable.rb b/lib/two_factor_authentication/models/two_factor_authenticatable.rb index eba51359..2c76b585 100644 --- a/lib/two_factor_authentication/models/two_factor_authenticatable.rb +++ b/lib/two_factor_authentication/models/two_factor_authenticatable.rb @@ -104,7 +104,7 @@ def encryption_options_for(value) { value: value, key: Devise.otp_secret_encryption_key, - iv: iv_for_attribute, + iv: iv_for_attribute[0..12], salt: salt_for_attribute } end