dont allow replies to invalid signatures
parent
3638db4895
commit
a05a391b7e
|
@ -144,16 +144,21 @@ class OnionrMail:
|
||||||
if not readBlock.validSig:
|
if not readBlock.validSig:
|
||||||
logger.warn('This message has an INVALID/NO signature. ANYONE could have sent this message.')
|
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).')
|
cancel = logger.readline('Press enter to continue to message, or -q to not open the message (recommended).')
|
||||||
|
print('')
|
||||||
if cancel != '-q':
|
if cancel != '-q':
|
||||||
try:
|
try:
|
||||||
print(draw_border(self.myCore._utils.escapeAnsi(readBlock.bcontent.decode().strip())))
|
print(draw_border(self.myCore._utils.escapeAnsi(readBlock.bcontent.decode().strip())))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
logger.warn('Error presenting message. This is usually due to a malformed or blank message.')
|
logger.warn('Error presenting message. This is usually due to a malformed or blank message.')
|
||||||
pass
|
pass
|
||||||
|
if readBlock.validSig:
|
||||||
reply = logger.readline("Press enter to continue, or enter %s to reply" % ("-r",))
|
reply = logger.readline("Press enter to continue, or enter %s to reply" % ("-r",))
|
||||||
print('')
|
print('')
|
||||||
if reply == "-r":
|
if reply == "-r":
|
||||||
self.draft_message(self.myCore._utils.bytesToStr(readBlock.signer,))
|
self.draft_message(self.myCore._utils.bytesToStr(readBlock.signer,))
|
||||||
|
else:
|
||||||
|
logger.readline("Press enter to continue")
|
||||||
|
print('')
|
||||||
return
|
return
|
||||||
|
|
||||||
def sentbox(self):
|
def sentbox(self):
|
||||||
|
|
Loading…
Reference in New Issue