From 8d8377415fbdf58cbca2dad7170c7e3b23d633ec Mon Sep 17 00:00:00 2001 From: John Hensley Date: Tue, 22 Jun 2021 14:38:58 -0400 Subject: [PATCH] Prevent creation of a duplicate source keypair (cherry picked from commit 919744607f4b7229df3c208bdf6249b599d751a7) --- securedrop/source_app/main.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py index f426220d61..136df8e359 100644 --- a/securedrop/source_app/main.py +++ b/securedrop/source_app/main.py @@ -226,11 +226,7 @@ def submit() -> werkzeug.Response: db.session.add(submission) new_submissions.append(submission) - # If necessary, generate a keypair to encrypt replies from the journalist - if g.source.pending or not current_app.crypto_util.get_fingerprint(g.filesystem_id): - current_app.crypto_util.genkeypair(g.filesystem_id, g.codename) - g.source.pending = False - + g.source.pending = False g.source.last_updated = datetime.utcnow() db.session.commit()