Skip to content

Commit

Permalink
Revert most changes to decrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
salbertson committed Mar 26, 2020
1 parent 824ce4a commit b8ddf22
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ def token=(value)
end

def token
crypt.decrypt_and_verify(self[:token]) if self[:token]
encrypted_token = self[:token]

unless encrypted_token.nil?
crypt.decrypt_and_verify(encrypted_token)
end
end

def payment_gateway_subscription
Expand Down
6 changes: 5 additions & 1 deletion app/models/violation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ def source=(value)
end

def source
crypt.decrypt_and_verify(self[:source]) if self[:source]
encrypted_source = self[:source]

unless encrypted_source.nil?
crypt.decrypt_and_verify(encrypted_source)
end
end

private
Expand Down

0 comments on commit b8ddf22

Please sign in to comment.