vault icon indicating copy to clipboard operation
vault copied to clipboard

Vault inserts newline escape character when reading a password file

Open sakharovaan opened this issue 2 years ago • 1 comments

Describe the bug Vault inserts newline escape sign when reading a password file

To Reproduce Steps to reproduce the behavior:

  1. Run echo "test" > password
  2. Run vault login -output-curl-string -address https://vault.local -method=ldap username=user password=@password
  3. See error: curl -X PUT -H "X-Vault-Request: true" -d '{"password":"test\n"}' https://vault.local/v1/auth/ldap/login/user

Expected behavior Password in JSON sent should be without newline

Environment:

  • Vault CLI Version: Vault v1.16.3 (e92d9a57018f43360e2e3717b3b6a7f650c88f4c), built 2024-05-29T14:28:42Z
  • Server Operating System/Architecture: Ubuntu 20.04.6 LTS

sakharovaan avatar Jun 10 '24 16:06 sakharovaan

Excuse me, it was vim who added EOL character at the end of file all along

sakharovaan avatar Jun 10 '24 17:06 sakharovaan