diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-07-20 15:46:38 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2017-08-07 15:20:02 +0200 |
commit | bdece1df9cad4dbe1b41215d21dbcf34bfee1c66 (patch) | |
tree | 83bc5434ac2ab668dd54ed9a86d86f27a534388d /source4/lib/http | |
parent | 56ab5cdbe0bddb3edaf0e7bf82f2c04cea6e64a4 (diff) | |
download | samba-bdece1df9cad4dbe1b41215d21dbcf34bfee1c66.tar.gz |
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 <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/lib/http')
-rw-r--r-- | source4/lib/http/http_auth.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |