qop is required nc and nonce (fixes #477)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@971 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Jan Kneschke 2006-02-01 11:32:33 +00:00
parent 06d111d8aa
commit 4a81e17c6c
1 changed files with 5 additions and 1 deletions

View File

@ -806,6 +806,10 @@ int http_auth_digest_check(server *srv, connection *con, mod_auth_plugin_data *p
/* parse credentials from client */
for (c = b->ptr; *c; c++) {
/* skip whitespaces */
while (*c == ' ' || *c == '\t') c++;
if (!c) break;
for (i = 0; dkv[i].key; i++) {
if ((0 == strncmp(c, dkv[i].key, dkv[i].key_len))) {
if ((c[dkv[i].key_len] == '"') &&
@ -847,7 +851,7 @@ int http_auth_digest_check(server *srv, connection *con, mod_auth_plugin_data *p
!realm ||
!nonce ||
!uri ||
(qop && !nc && !cnonce) ||
(qop && (!nc || !cnonce)) ||
!respons ) {
/* missing field */