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
svn/tags/lighttpd-1.4.11
Jan Kneschke 17 years ago
parent 06d111d8aa
commit 4a81e17c6c
  1. 6
      src/http_auth.c

@ -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 */

Loading…
Cancel
Save