Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiencing multiple issues with decryption in production app #323

Closed
amrocco opened this issue Sep 18, 2018 · 1 comment
Closed

Experiencing multiple issues with decryption in production app #323

amrocco opened this issue Sep 18, 2018 · 1 comment

Comments

@amrocco
Copy link

amrocco commented Sep 18, 2018

I am running into some issues with decryption in my application. Our exception notifier is reporting: must specify an iv with the backtrace:
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/encryptor-3.0.0/lib/encryptor.rb:61:in crypt'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/encryptor-3.0.0/lib/encryptor.rb:49:in decrypt' /home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/attr_encrypted-3.1.0/lib/attr_encrypted.rb:240:in decrypt'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/attr_encrypted-3.1.0/lib/attr_encrypted.rb:329:in decrypt' /home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/attr_encrypted-3.1.0/lib/attr_encrypted.rb:161:in block (2 levels) in attr_encrypted'
(eval):16:in block in compile_source' /home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/rabl-rails-0.4.3/lib/rabl-rails/visitors/to_hash.rb:43:in instance_exec'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/rabl-rails-0.4.3/lib/rabl-rails/visitors/to_hash.rb:43:in visit_Code' /home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/rabl-rails-0.4.3/lib/rabl-rails/visitors/visitor.rb:14:in dispatch'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/rabl-rails-0.4.3/lib/rabl-rails/visitors/visitor.rb:4:in visit'

And also another exception with no message, with the backtrace:
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/encryptor-3.0.0/lib/encryptor.rb:98:in final'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/encryptor-3.0.0/lib/encryptor.rb:98:in crypt' /home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/encryptor-3.0.0/lib/encryptor.rb:49:in decrypt'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/attr_encrypted-3.1.0/lib/attr_encrypted.rb:240:in decrypt' /home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/attr_encrypted-3.1.0/lib/attr_encrypted.rb:329:in decrypt'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/attr_encrypted-3.1.0/lib/attr_encrypted.rb:161:in block (2 levels) in attr_encrypted' (eval):16:in block in compile_source'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/rabl-rails-0.4.3/lib/rabl-rails/visitors/to_hash.rb:43:in instance_exec' /home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/rabl-rails-0.4.3/lib/rabl-rails/visitors/to_hash.rb:43:in visit_Code'
/home/ubuntu/.../current/vendor/bundle/ruby/2.5.0/gems/rabl-rails-0.4.3/lib/rabl-rails/visitors/visitor.rb:14:in dispatch'

If I go into the rails console and try to decrypt all of the objects that are throwing these errors they decrypt without issue, however we're getting these exceptions every 30-40 minutes in our production app (so not every time the specific call is made).

Using rails 5.1.6, ruby 2.5.1, and attr_encrypted 3.1.0

@amrocco
Copy link
Author

amrocco commented Sep 18, 2018

This sounds very similar to what is being mentioned here: #320

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

No branches or pull requests

1 participant