Browse Source

fix password hint check

don't show password hints if you have disabled the hints with
PASSWORD_HINTS_ALLOWED=false or if you have not configured mail and
opted into showing password hints
pull/5189/head
Stefan Melmuk 5 months ago
parent
commit
b224721c8a
No known key found for this signature in database GPG Key ID: 817020C608FE9C09
  1. 2
      src/api/core/accounts.rs

2
src/api/core/accounts.rs

@ -842,7 +842,7 @@ struct PasswordHintData {
#[post("/accounts/password-hint", data = "<data>")]
async fn password_hint(data: Json<PasswordHintData>, mut conn: DbConn) -> EmptyResult {
if !CONFIG.mail_enabled() || !CONFIG.show_password_hint() {
if !CONFIG.password_hints_allowed() || (!CONFIG.mail_enabled() && !CONFIG.show_password_hint()) {
err!("This server is not configured to provide password hints.");
}

Loading…
Cancel
Save