Skip to content

Conversation

swiknaba
Copy link
Contributor

@swiknaba swiknaba commented Oct 6, 2020

creating new credentials fails with

0.4.0/lib/diffcrypt/rails/encrypted_configuration.rb:102:in `decrypt': undefined method `decrypt_and_verify' for nil:NilClass (NoMethodError)

it seems decrypt_and_verify is never called, thus @decrypt_and_verify is not populated and hence results in this error.

Not sure if

      def active_support_encryptor
        @active_support_encryptor = ActiveSupport::MessageEncryptor.new(
          [key].pack('H*'),
          cipher: @diffcrypt_file.cipher,
        )
      end

was intended to memorize the AS Message Encryptor instance, if so, we can drop in @active_support_encryptor ||= ....

@marcqualie
Copy link
Collaborator

Related to: #29

@marcqualie marcqualie merged commit 9956f67 into diffcrypt:master Oct 6, 2020
@swiknaba swiknaba deleted the fix-undefined-as-encryptor branch October 6, 2020 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants