vault
vault copied to clipboard
Vault inserts newline escape character when reading a password file
Describe the bug Vault inserts newline escape sign when reading a password file
To Reproduce Steps to reproduce the behavior:
- Run
echo "test" > password - Run
vault login -output-curl-string -address https://vault.local -method=ldap username=user password=@password - 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
Excuse me, it was vim who added EOL character at the end of file all along