From bdece1df9cad4dbe1b41215d21dbcf34bfee1c66 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 20 Jul 2017 15:46:38 +0200 Subject: s4:lib/http: use strcasecmp(h->key, "WWW-Authenticate") instead of strncasecmp() The key is already normalized and should match completely. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- source4/lib/http/http_auth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/lib/http') diff --git a/source4/lib/http/http_auth.c b/source4/lib/http/http_auth.c index 701d9b3bae3..654183391e2 100644 --- a/source4/lib/http/http_auth.c +++ b/source4/lib/http/http_auth.c @@ -61,7 +61,10 @@ static NTSTATUS http_parse_auth_response(enum http_auth_method auth, struct http_header *h; for (h = auth_response->headers; h != NULL; h = h->next) { - if (strncasecmp(h->key, "WWW-Authenticate", 16) != 0) { + int cmp; + + cmp = strcasecmp(h->key, "WWW-Authenticate"); + if (cmp != 0) { continue; } -- cgit v1.2.1