logoalt Hacker News

phyzome • today at 4:51 PM • 1 reply • view on HN

I actually have a terminal program that needs to ask for sensitive inputs from the user sometimes, potentially after attacker data has been printed. I've been trying to figure out how I should handle that!

My plan was to encode to Unicode (lossily), strip out control characters, and add some visual framing. Anything else I should be considering? Is there a standard approach? Haven't actually done the research on this yet, but since it came up here, I figure someone might know.

(This is https://codeberg.org/timmc/breakmancer if anyone is interested.)


Replies

dingaling911 • today at 5:15 PM

I don't understand the UX you have in mind, just do it like SSH used to do, a non-echo input field?