1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-08-26 20:53:20 +00:00

completly hide reset password policy

on email disabled instances
This commit is contained in:
sirux88 2023-02-05 16:47:23 +01:00
commit 0d1753ac74
2 changed files with 2 additions and 6 deletions

View file

@ -1585,10 +1585,6 @@ async fn put_policy(
}
}
if pol_type_enum == OrgPolicyType::ResetPassword && data.enabled && !CONFIG.mail_enabled() {
err!("Due to potential security flaws and/or misuse reset password policy is disabled on mail disabled instances")
}
let mut policy = match OrgPolicy::find_by_org_and_type(&org_id, pol_type_enum, &mut conn).await {
Some(p) => p,
None => OrgPolicy::new(org_id.clone(), pol_type_enum, "{}".to_string()),