c8ca0f8 vault: piped input for ipa vault-add fails

1 file Authored by frenaud 6 years ago, Committed by mbasti 6 years ago,
    vault: piped input for ipa vault-add fails
    
    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://pagure.io/freeipa/issue/6907
    
    Reviewed-By: Christian Heimes <cheimes@redhat.com>
    Reviewed-By: Abhijeet Kasurde <akasurde@redhat.com>
    Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
    
        
file modified
+8 -29