From 93958499f250da599368de40bc2ba742832fb189 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 21 Feb 2025 12:28:19 +0100 Subject: [PATCH] http: fix the auth check It used the wrong variable. Follow-up to d1fc1c4a854d5cc809cc4ae59a9511900228023a Pointed-out-by: qhill on github Ref: https://github.com/curl/curl/pull/16406#pullrequestreview-2632734134 Closes #16419 --- lib/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http.c b/lib/http.c index 4bbe827a1d91..86e252118438 100644 --- a/lib/http.c +++ b/lib/http.c @@ -880,7 +880,7 @@ static bool authcmp(const char *auth, const char *line) { /* the auth string must not have an alnum following */ size_t n = strlen(auth); - return strncasecompare(auth, line, n) && !ISALNUM(auth[n]); + return strncasecompare(auth, line, n) && !ISALNUM(line[n]); } #endif