hannesm / jackline

minimalistic secure XMPP client in OCaml
BSD 2-Clause "Simplified" License
250 stars 20 forks source link

should /clear also erase input history? #180

Open cfcs opened 6 years ago

cfcs commented 6 years ago

/clear currently erases the backlog of received messages, originally as a privacy feature to "burn after reading". It occurred to me that we might want to also blank the input state - so it is not available by accidentally scrolling up with the mouse wheel, or with the arrow keys.

hannesm commented 6 years ago

sounds like a good idea! thanks!

hannesm commented 6 years ago

should we also do a full GC collection afterwards? this won't zero out all the memory (i.e. strings /dev/mem will still contain all the text), but it's better than not doing it, maybe!?

cfcs commented 6 years ago

@hannesm yes!

I had a package on the drawing board that would in the spirit of "best effort" call mlockall()/(mlock() on as much as possible) as well as hook the runtime to clean heap data, I hope to get back to that sometime.