mirror of
https://github.com/we-promise/sure.git
synced 2026-04-23 14:04:06 +00:00
Initial security fixes (#461)
* Initial sec * Update PII fields * FIX add tests * FIX safely read plaintext data on rake backfill * Update user.rb * FIX tests * encryption_ready? block * Test conditional to encryption on --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com> Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
class PlaidAccount < ApplicationRecord
|
||||
include Encryptable
|
||||
|
||||
# Encrypt raw payloads if ActiveRecord encryption is configured
|
||||
if encryption_ready?
|
||||
encrypts :raw_payload
|
||||
encrypts :raw_transactions_payload
|
||||
encrypts :raw_investments_payload
|
||||
encrypts :raw_liabilities_payload
|
||||
end
|
||||
|
||||
belongs_to :plaid_item
|
||||
|
||||
# Legacy association via foreign key (will be removed after migration)
|
||||
|
||||
Reference in New Issue
Block a user