diff --git a/src/methods/account_update.rs b/src/methods/account_update.rs index 977e625..8733210 100644 --- a/src/methods/account_update.rs +++ b/src/methods/account_update.rs @@ -42,7 +42,7 @@ pub async fn post_update_ldap(mut req: Request) -> tide::Result { pw_keep_same = true; pw_secure = true; } - if !tmp.attrs["skSecure"].is_empty() && tmp.attrs["skSecure"][0] == "1" { + if tmp.attrs.contains_key("skSecure") && !tmp.attrs["skSecure"].is_empty() && tmp.attrs["skSecure"][0] == "1" { pw_secure = true; } }