fix hibp username encoding and pw hint check (#5180)

* fix hibp username encoding

Signed-off-by: BlackDex <black.dex@gmail.com>

* Fix password-hint check

Signed-off-by: BlackDex <black.dex@gmail.com>

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
This commit is contained in:
Mathijs van Veluw
2024-11-12 11:09:28 +01:00
committed by GitHub
parent 294b429436
commit ba48ca68fc
2 changed files with 2 additions and 2 deletions

View File

@@ -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.mail_enabled() || !CONFIG.show_password_hint() {
err!("This server is not configured to provide password hints.");
}