diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-16 00:15:30 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-16 00:15:30 -0600 |
commit | 096e6b9330ee6d9e972214f9458202dc173d4c67 (patch) | |
tree | 76c4760b88f5e8940a91dd49894ac65e775e2b1a /app/controllers/concerns | |
parent | f14f7e0f0e3ceb6aefbebf4fcbcecf223dcb13db (diff) |
handle possibility of account being `nil`
Diffstat (limited to 'app/controllers/concerns')
-rw-r--r-- | app/controllers/concerns/signature_verification.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/concerns/signature_verification.rb b/app/controllers/concerns/signature_verification.rb index 42f4d969e..e58f684e7 100644 --- a/app/controllers/concerns/signature_verification.rb +++ b/app/controllers/concerns/signature_verification.rb @@ -25,7 +25,7 @@ module SignatureVerification def signed_request_account if defined?(@signed_request_account) - if @signed_request_account.known? + if @signed_request_account&.known? return @signed_request_account else @signature_verification_failure_reason = 'Not authorized' @@ -67,7 +67,7 @@ module SignatureVerification @signature_verification_failure_reason = "Public key not found for key #{signature_params['keyId']}" @signed_request_account = nil return - elsif !account.known? + elsif !account&.known? @signature_verification_failure_reason = 'Not authorized' @signed_request_account = nil return |