flo-renaud
2017-04-27 17:26:26 UTC
URL: https://github.com/freeipa/freeipa/pull/747
Author: flo-renaud
Title: #747: vault: piped input for ipa vault-add fails
Action: opened
PR body:
"""
An exception is raised when using echo "Secret123\n" | ipa vault-add myvault
This happens because the code is using (string).decode(sys.stdin.encoding)
and sys.stdin.encoding is None when the input is read from a pipe.
The fix is using the prompt_password method defined by Backend.textui,
which gracefully handles this issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1445358
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/747/head:pr747
git checkout pr747
Author: flo-renaud
Title: #747: vault: piped input for ipa vault-add fails
Action: opened
PR body:
"""
An exception is raised when using echo "Secret123\n" | ipa vault-add myvault
This happens because the code is using (string).decode(sys.stdin.encoding)
and sys.stdin.encoding is None when the input is read from a pipe.
The fix is using the prompt_password method defined by Backend.textui,
which gracefully handles this issue.
https://bugzilla.redhat.com/show_bug.cgi?id=1445358
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/747/head:pr747
git checkout pr747