mirror of
https://github.com/simple-login/app.git
synced 2024-11-13 07:31:12 +01:00
raise exception when signature is empty (#1833)
Co-authored-by: Son NK <son@simplelogin.io>
This commit is contained in:
parent
6c7e9e69dc
commit
06b7e05e61
1 changed files with 2 additions and 2 deletions
|
@ -543,7 +543,7 @@ def sign_msg(msg: Message) -> Message:
|
|||
payload = sign_data(message_to_bytes(msg).replace(b"\n", b"\r\n"))
|
||||
|
||||
if not payload:
|
||||
LOG.e(f"Empty payload when signing {msg}")
|
||||
raise PGPException("Empty signature by gnupg")
|
||||
|
||||
signature.set_payload(payload)
|
||||
except Exception:
|
||||
|
@ -551,7 +551,7 @@ def sign_msg(msg: Message) -> Message:
|
|||
payload = sign_data_with_pgpy(message_to_bytes(msg).replace(b"\n", b"\r\n"))
|
||||
|
||||
if not payload:
|
||||
LOG.e(f"Empty payload when signing with pgpy {msg}")
|
||||
raise PGPException("Empty signature by pgpy")
|
||||
|
||||
signature.set_payload(payload)
|
||||
|
||||
|
|
Loading…
Reference in a new issue