Originally created by @TheHellSite on GitHub (Sep 23, 2021).
Subject of the issue
My SMTP password contains special characters (f.e. ~^",.%\,'}&@|/(#}) which seem to be an issue for Vaultwarden if it is reading the password from the vaultwarden.env file.
If I set it through the admin panel it works just fine but doesn't get saved to vaultwarden.env file.
Deployment environment
Proxmox Arch Linux LXC
vaultwarden version: 1.22.2
Install method: OS package
Steps to reproduce
Use an SMTP password that contains \ as a character.
I don't know if " and ' are also causing some trouble?
\ character should get recognized in the password field when set using the vaultwarden.env file.
Actual behaviour
\ character is ignored or replaced with no character at all.
Originally created by @TheHellSite on GitHub (Sep 23, 2021).
### Subject of the issue
My SMTP password contains special characters (f.e. ``~^",.%\,'}&@|/(#}``) which seem to be an issue for Vaultwarden if it is reading the password from the ``vaultwarden.env`` file.
If I set it through the admin panel it works just fine but doesn't get saved to ``vaultwarden.env`` file.
### Deployment environment
* Proxmox Arch Linux LXC
* vaultwarden version: 1.22.2
* Install method: OS package
### Steps to reproduce
Use an SMTP password that contains ``\`` as a character.
I don't know if ``"`` and ``'`` are also causing some trouble?
```
INPUT vaultwarden.env: ~^",.%\,'}&@|/(#}
OUTPUT admin panel: ~^",.%,'}&@|/(#}
Replaced characters: \
```
### Expected behaviour
``\`` character should get recognized in the password field when set using the vaultwarden.env file.
### Actual behaviour
``\`` character is ignored or replaced with no character at all.
A \ is an escape parameter. If you want to use that you need to type \\.
Also, Quotes, no matter if they are double or single could be needed to be escaped also.
It could depend on which type of env parsing there is used, but if you want the password you provided above you need to enter it like this for at least docker run, docker-compose or using the .env file: "~^\",.%\\,'}&@|/(#}"
It is enclosed within double quotes "
The " of the password is escaped via \"
The \ of the password is escaped via \\
@BlackDex commented on GitHub (Sep 23, 2021):
A `\` is an escape parameter. If you want to use that you need to type `\\`.
Also, Quotes, no matter if they are double or single could be needed to be escaped also.
It could depend on which type of env parsing there is used, but if you want the password you provided above you need to enter it like this for at least `docker run`, `docker-compose` or using the `.env` file:
`"~^\",.%\\,'}&@|/(#}"`
1. It is enclosed within double quotes `"`
2. The `"` of the password is escaped via `\"`
3. The `\` of the password is escaped via `\\`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @TheHellSite on GitHub (Sep 23, 2021).
Subject of the issue
My SMTP password contains special characters (f.e.
~^",.%\,'}&@|/(#}) which seem to be an issue for Vaultwarden if it is reading the password from thevaultwarden.envfile.If I set it through the admin panel it works just fine but doesn't get saved to
vaultwarden.envfile.Deployment environment
Proxmox Arch Linux LXC
vaultwarden version: 1.22.2
Install method: OS package
Steps to reproduce
Use an SMTP password that contains
\as a character.I don't know if
"and'are also causing some trouble?Expected behaviour
\character should get recognized in the password field when set using the vaultwarden.env file.Actual behaviour
\character is ignored or replaced with no character at all.@BlackDex commented on GitHub (Sep 23, 2021):
A
\is an escape parameter. If you want to use that you need to type\\.Also, Quotes, no matter if they are double or single could be needed to be escaped also.
It could depend on which type of env parsing there is used, but if you want the password you provided above you need to enter it like this for at least
docker run,docker-composeor using the.envfile:"~^\",.%\\,'}&@|/(#}"""of the password is escaped via\"\of the password is escaped via\\@TheHellSite commented on GitHub (Sep 23, 2021):
Thanks, that explained and solved it!
I only had to escape
\using\\.