Skip to content

Commit

Permalink
Merge pull request #6013 from freedomofpress/backport-6011
Browse files Browse the repository at this point in the history
[2.0.0] Backport: Prevent creation of a duplicate source keypair
  • Loading branch information
rmol authored Jun 22, 2021
2 parents 1db74f7 + 8d83774 commit c35b6ae
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions securedrop/source_app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit c35b6ae

Please sign in to comment.