Input is printed as well as obfuscation #4

Closed
jcoglan opened this Issue Jul 29, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@jcoglan
Contributor

jcoglan commented Jul 29, 2012

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

This comment has been minimized.

Show comment
Hide comment
@substack

substack Jul 29, 2012

Owner

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

Owner

substack commented Jul 29, 2012

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

@jcoglan

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Jul 29, 2012

Contributor

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.

Contributor

jcoglan commented Jul 29, 2012

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 Jul 29, 2012

@jcoglan

This comment has been minimized.

Show comment
Hide comment
@jcoglan

jcoglan Jul 29, 2012

Contributor

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.

Contributor

jcoglan commented Jul 29, 2012

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