vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit 891178d5d5fd4421e4214d182f00a7fa5fd39f00
parent 190bc9d47ce3a0030414806fd48e14d946a37888
Author: Zack Newman <zack@philomathiclife.com>
Date:   Mon, 13 Nov 2023 09:14:13 -0700

forgot to commit typo fixes

Diffstat:
Msrc/main.rs | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -126,7 +126,7 @@ fn validate_config(mut path: PathBuf) -> Result<(), Error> { } else if CONFIG._enable_email_2fa() { err!("'_ENABLE_EMAIL_2FA=false' must be set in the config file") } else if CONFIG.is_admin_token_set() { - err!("'ADMIN_TOKEN' must not exit in the config file or be empty") + err!("'ADMIN_TOKEN' must not exist in the config file or be empty") } else if !CONFIG.disable_icon_download() { err!("'DISABLE_ICON_DOWNLOAD=true' must be set in the config file") } else if CONFIG.org_events_enabled() { @@ -140,10 +140,15 @@ fn validate_config(mut path: PathBuf) -> Result<(), Error> { } else if CONFIG.log_file().is_some() { err!("'LOG_FILE' must not exist in the config file") } else if !CONFIG.disable_2fa_remember() { - err!("'DISABLE_2FA_REMEMBER=false' must be set in the config file") + err!("'DISABLE_2FA_REMEMBER=true' must be set in the config file") } else { - path.push(CONFIG.data_folder()); - unveil_create_read_write(path).map_err(Error::from) + let data_folder = PathBuf::from(CONFIG.data_folder()); + if data_folder.is_absolute() { + unveil_create_read_write(data_folder).map_err(Error::from) + } else { + path.push(data_folder); + unveil_create_read_write(path).map_err(Error::from) + } } } pub const VERSION: &str = env!("CARGO_PKG_VERSION");