Skip to content

Commit

Permalink
Merge pull request #38 from Mastercard/feature/jwe-empty-response
Browse files Browse the repository at this point in the history
Handle JWE empty response
  • Loading branch information
danny-gallagher authored Jul 5, 2024
2 parents 7e2eaa0 + ae3a823 commit d26a1cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion client_encryption/api_encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ def encrypt_jwe_payload(conf, body):
@staticmethod
def decrypt_jwe_payload(conf, body):
decrypted_body = decrypt_jwe(body, conf)
payload = json.dumps(decrypted_body).encode('utf-8')
try:
payload = json.dumps(decrypted_body).encode('utf-8')
except:
payload = decrypted_body

return payload

Expand Down
2 changes: 1 addition & 1 deletion client_encryption/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = "1.21.0"
__version__ = "1.21.1"

0 comments on commit d26a1cd

Please sign in to comment.