OTR: Prevent input when contact disconnects
Profanity 0.5.1
Issue
During an OTR session, if I am typing a message and the contact DROPs offline (or closes their window for some other software, that usually ends OTR session), if I hit "enter" it is sent in clear text.
This has happened a few times actually. I was typing and literally 1 second before i hit enter, they dropped, i hit enter, and it was sent in the clear! Which they got the offline message, in the clear, and warned me about it.
Proposal
- The OTR plugin could have an option to prevent any messages sent unencrypted after an existing OTR session. Perhaps with a configurable timeout.
- The OTR plugin could have an option to prevent any unencrypted messages for a contact. Period. We'd be forced to "allow unencrypted" if we want to send something in an offline message, unencrypted.
Reference
This is similar to the list in #840, though this issue is more to focus on testing to prevent such a use case.
It could be closed in favor of #840 I suppose. But, a focus on actually testing that this works is why the issue exists - instead of being lost in other work done in that other issue.