fix: what happens when the key does not exist
This commit is contained in:
parent
f73a7dfa29
commit
25ad5ca62c
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ pub async fn post_update_ldap(mut req: Request<State>) -> 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue