Skip to content

Commit

Permalink
fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Karman committed Oct 25, 2016
1 parent dcf10d8 commit c51ffac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/pii/cacher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(user, user_session)

def save(password, profile = user.active_profile)
return unless profile
user_session[:encrypted_pii] = re_encrypt(profile)
user_session[:encrypted_pii] = re_encrypt(profile, password)
end

def fetch
Expand All @@ -25,7 +25,7 @@ def encryptor
Pii::Encryptor.new
end

def re_encrypt(profile)
def re_encrypt(profile, password)
decrypted_pii = profile.decrypt_pii(password)
pii_json = decrypted_pii.to_json
encryptor.encrypt(pii_json)
Expand Down

0 comments on commit c51ffac

Please sign in to comment.