Skip to content

Loading…

Input is printed as well as obfuscation #4

Closed
jcoglan opened this Issue · 3 comments

2 participants

@jcoglan

On my machine (Ubuntu 12.04, 64-bit desktop), since Node v0.6.0 this code:

process.stderr.write('Passphrase: ');
pw('*', process.stdin, process.stderr, callback);

Makes this happen:

Passphrase: s*o*m*e*t*h*i*n*g*

On Node 0.4.12, only the asterisks are printed.

@substack
Owner

This is super strange! On my machine (also ubuntu) with both node 0.6 and 0.8 the same code only prints *s.

@jcoglan

Sorry, turns out this a side effect of me also starting a readline session at the same time. I can probably confine that to the code path it's needed in, which is separate from the password prompt path.

@jcoglan jcoglan closed this
@jcoglan

This fixes my problem. jcoglan/vault@de686e7

Not sure if this is a problem with pw or not, i.e. whether it should know how not to conflict with readline. I'll leave that up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.