[GH-ISSUE #1196] Handle spaces in unquoted env variables #17616

Closed
opened 2026-04-25 19:52:29 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @xoxys on GitHub (Oct 21, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1196

Subject of the issue

Spaces in an unquoted env variable value will stop processing every following env var which may result in various errors.

Your environment

  • Bitwarden_rs version: 1.17.0
  • Install method: Custom Docker Image

Steps to reproduce

Add a space to an env var value:

SMTP_FROM_NAME=Bitwarden RS                
SMTP_USERNAME=relay@example.com       
SMTP_PASSWORD=1234567                       
SMTP_AUTH_MECHANISM=plain                   
SMTP_TIMEOUT=30

Check the loaded values in the admin dashboard. All settings after SMTP_FROM_NAME will not be applied anymore. Quoting the value will fix the issue e.g. SMTP_FROM_NAME="Bitwarden RS".

Expected behaviour

Some kind of improved error handling. Add a variable parsing error message to the log, or fix it automatically and strip off everything after a space. Maybe we could still have a warning in the logs that var EXAMPLE was stripped.

Originally created by @xoxys on GitHub (Oct 21, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1196 ### Subject of the issue Spaces in an unquoted env variable value will stop processing every following env var which may result in various errors. ### Your environment * Bitwarden_rs version: 1.17.0 * Install method: Custom Docker Image ### Steps to reproduce Add a space to an env var value: ``` SMTP_FROM_NAME=Bitwarden RS SMTP_USERNAME=relay@example.com SMTP_PASSWORD=1234567 SMTP_AUTH_MECHANISM=plain SMTP_TIMEOUT=30 ``` Check the loaded values in the admin dashboard. All settings after `SMTP_FROM_NAME` will not be applied anymore. Quoting the value will fix the issue e.g. `SMTP_FROM_NAME="Bitwarden RS"`. ### Expected behaviour Some kind of improved error handling. Add a variable parsing error message to the log, or fix it automatically and strip off everything after a space. Maybe we could still have a warning in the logs that var `EXAMPLE` was stripped.
GiteaMirror added the buglow priority labels 2026-04-25 19:52:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#17616