Stop processing when we hit bad encryption in mobile app (#88150)
* Stop processing when we hit bad encryption * Accept webhook payload that is a list * Rename functions because we import them * Revert a debug thing --------- Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
This commit is contained in:
parent
57738fbb8c
commit
bc2b35765e
3 changed files with 37 additions and 38 deletions
|
@ -92,7 +92,7 @@ def _decrypt_payload_helper(
|
|||
return message
|
||||
|
||||
|
||||
def _decrypt_payload(key: str | None, ciphertext: str) -> JsonValueType | None:
|
||||
def decrypt_payload(key: str | None, ciphertext: str) -> JsonValueType | None:
|
||||
"""Decrypt encrypted payload."""
|
||||
|
||||
def get_key_bytes(key: str, keylen: int) -> str:
|
||||
|
@ -101,7 +101,7 @@ def _decrypt_payload(key: str | None, ciphertext: str) -> JsonValueType | None:
|
|||
return _decrypt_payload_helper(key, ciphertext, get_key_bytes, HexEncoder)
|
||||
|
||||
|
||||
def _decrypt_payload_legacy(key: str | None, ciphertext: str) -> JsonValueType | None:
|
||||
def decrypt_payload_legacy(key: str | None, ciphertext: str) -> JsonValueType | None:
|
||||
"""Decrypt encrypted payload."""
|
||||
|
||||
def get_key_bytes(key: str, keylen: int) -> bytes:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue