From c97a9e0c7779a5460cd50c3b18c2f2fb29a1f4a7 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Fri, 28 Jan 2011 02:06:17 +0100 Subject: [PATCH] Properly handle unsupported qops in digest_authentication_encode(). Auth-int is not supported yet, so the function should return early. --- http-auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http-auth.c b/http-auth.c index 1085947..c41d77b 100644 --- a/http-auth.c +++ b/http-auth.c @@ -178,7 +178,7 @@ char* digest_authentication_encode(const char *line, const char *user, const cha return NULL; } - if (qop && strncasecmp(qop, "auth", 4) != 0) { + if (qop && strncasecmp(qop, "auth", 5) != 0) { /* FIXME: currently don't support auth-int */ free(realm); free(opaque);