Skip to content

Commit 01a2ad8

Browse files
committed
Document why pre-encrypted reply only does a very basic PGP sniff
1 parent 328fe36 commit 01a2ad8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

securedrop/store.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ def save_file_submission(
342342
def save_pre_encrypted_reply(
343343
self, filesystem_id: str, count: int, journalist_filename: str, content: str
344344
) -> str:
345+
# This check is merely to prevent misuse of the API, it is not intended
346+
# to perform full OpenPGP validation, as we can't comprehensively do that
347+
# short of decrypting the whole message.
345348
if "-----BEGIN PGP MESSAGE-----" not in content.split("\n")[0]:
346349
raise NotEncrypted
347350

0 commit comments

Comments
 (0)