Sat, 26 Oct 2019 12:40:35 +0200
increase security in case of broken secret stores
dav/main.c | file | annotate | diff | comparison | revisions |
--- a/dav/main.c Sat Oct 26 12:38:33 2019 +0200 +++ b/dav/main.c Sat Oct 26 12:40:35 2019 +0200 @@ -556,9 +556,11 @@ // we can set the user/password if(id && (secrets->isdecrypted || !decrypt_secrets(a, secrets))) { PwdEntry *cred = pwdstore_get(secrets, id); - *user = cred->user; - *password = cred->password; - ret = 1; + if(cred) { + *user = cred->user; + *password = cred->password; + ret = 1; + } } free(req_url_proto.ptr);