Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secure fields show using grep #450

Closed
trevren11 opened this issue May 29, 2016 · 4 comments
Closed

Secure fields show using grep #450

trevren11 opened this issue May 29, 2016 · 4 comments

Comments

@trevren11
Copy link

If you try to run a command and grep the output and the action requires a password, the password field is no longer hidden

Example:

>>>>  randomCommand | grep SHA1
Enter keystore password:  SHOWSPASSWORD
         SHA1: some output
         Signature algorithm name: SHA1withDSA

Should be:

>>>>  randomCommand | grep SHA1
Enter keystore password: 
         SHA1: some output
         Signature algorithm name: SHA1withDSA
@DHowett
Copy link
Member

DHowett commented May 29, 2016

It looks like the issue might be in printing escapes (like tty echo off) to stderr. They may be ending up piped to grep instead.

@stehufntdev
Copy link
Collaborator

Thanks for reporting the issue, can you please provide the repro that you tried? Locally I changed my password to secret and I didn't see the password printed out:

root@TEST-6:/mnt/c/Users/Test/AppData/Local/lxss# passwd | grep secret
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

@trevren11
Copy link
Author

I am using this command.I am developing with Android using the Java keytool.

C:\Program Files\Java\jdk1.8.0_91\bin>keytool -exportcert -list -v -alias tester -keystore C:\Users\user\.keystore\test | grep SHA1
Enter keystore password:  password
         SHA1: AA:AA:AA:AA:AA:AA:AA:AA:AA:AA:AA
         Signature algorithm name: SHA1withDSA

@benhillis
Copy link
Member

I tried this locally and I'm not seeing secure fields in grep when using "sudo." There hasn't been activity on this thread in some time so I'm closing it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants