diff options
author | metamuffin <metamuffin@disroot.org> | 2023-12-26 22:37:29 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-12-26 22:37:29 +0100 |
commit | f0a1e6615c147f740ee1ec0bb6f06ca9e450cc98 (patch) | |
tree | 91f9c893f3eadf811d2626f4c6166f4ba38bdc22 /tool | |
parent | 2ff2d07b5ed265d0f4ce095002484fe771e51dae (diff) | |
download | jellything-f0a1e6615c147f740ee1ec0bb6f06ca9e450cc98.tar jellything-f0a1e6615c147f740ee1ec0bb6f06ca9e450cc98.tar.bz2 jellything-f0a1e6615c147f740ee1ec0bb6f06ca9e450cc98.tar.zst |
disable admin account by default for sane default config
Diffstat (limited to 'tool')
-rw-r--r-- | tool/src/main.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tool/src/main.rs b/tool/src/main.rs index f199761..c220a08 100644 --- a/tool/src/main.rs +++ b/tool/src/main.rs @@ -109,8 +109,6 @@ fn main() -> anyhow::Result<()> { base64::engine::general_purpose::STANDARD .encode([(); 32].map(|_| random())), ), - admin_username: "admin".to_string(), - admin_password: "hackme".to_string(), login_expire: 10, ..Default::default() }, @@ -129,7 +127,7 @@ fn main() -> anyhow::Result<()> { }, )?; info!("{brand:?} is ready!"); - warn!("please change the admin password."); + warn!("please add an admin password to login."); Ok(()) } a @ Action::Migrate { .. } => migrate(a), @@ -145,8 +143,12 @@ fn main() -> anyhow::Result<()> { .login(CreateSessionParams { drop_permissions: None, expire: None, - password: config.admin_password, - username: config.admin_username, + password: config + .admin_password + .ok_or(anyhow!("admin account required"))?, + username: config + .admin_username + .ok_or(anyhow!("admin account required"))?, }) .await?; |