From 97eed364fffde377e23ae0821d079ec1b6104d1f Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Mon, 18 Oct 2021 11:04:42 -0400 Subject: [PATCH] [mod_auth] revert adjustment to auth passwd cache (#3112) revert b1d1202a which is no longer needed with recent update to ck_memeq_const_time() x-ref: https://redmine.lighttpd.net/issues/3112 "mod_auth cache password doesn't match" --- src/mod_auth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mod_auth.c b/src/mod_auth.c index 6fb7cd7c..c0beb355 100644 --- a/src/mod_auth.c +++ b/src/mod_auth.c @@ -63,7 +63,7 @@ http_auth_cache_entry_init (const struct http_auth_require_t * const require, co *(store pointer to http_auth_require_t, which is persistent * and will be different for each realm + permissions combo)*/ http_auth_cache_entry * const ae = - malloc(sizeof(http_auth_cache_entry) + ulen + pwlen+1); + malloc(sizeof(http_auth_cache_entry) + ulen + pwlen); force_assert(ae); ae->require = require; ae->ctime = log_monotonic_secs; @@ -74,7 +74,6 @@ http_auth_cache_entry_init (const struct http_auth_require_t * const require, co ae->pwdigest = ae->username + ulen; memcpy(ae->username, username, ulen); memcpy(ae->pwdigest, pw, pwlen); - ae->pwdigest[pwlen] = '\0'; return ae; }