From a05a391b7e442022654185cb6ec2a1aed2c3ecd9 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Sun, 17 Feb 2019 14:44:51 -0600 Subject: [PATCH] dont allow replies to invalid signatures --- onionr/static-data/default-plugins/pms/main.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/onionr/static-data/default-plugins/pms/main.py b/onionr/static-data/default-plugins/pms/main.py index 806e4eef..a5efab12 100755 --- a/onionr/static-data/default-plugins/pms/main.py +++ b/onionr/static-data/default-plugins/pms/main.py @@ -144,16 +144,21 @@ class OnionrMail: if not readBlock.validSig: logger.warn('This message has an INVALID/NO signature. ANYONE could have sent this message.') cancel = logger.readline('Press enter to continue to message, or -q to not open the message (recommended).') + print('') if cancel != '-q': try: print(draw_border(self.myCore._utils.escapeAnsi(readBlock.bcontent.decode().strip()))) except ValueError: logger.warn('Error presenting message. This is usually due to a malformed or blank message.') pass - reply = logger.readline("Press enter to continue, or enter %s to reply" % ("-r",)) - print('') - if reply == "-r": - self.draft_message(self.myCore._utils.bytesToStr(readBlock.signer,)) + if readBlock.validSig: + reply = logger.readline("Press enter to continue, or enter %s to reply" % ("-r",)) + print('') + if reply == "-r": + self.draft_message(self.myCore._utils.bytesToStr(readBlock.signer,)) + else: + logger.readline("Press enter to continue") + print('') return def sentbox(self):