paivana

HTTP paywall reverse proxy
Log | Files | Refs | Submodules | README | LICENSE

commit e8fa7afd442f8914affe99b59420158656368305
parent f7291bccf247e03f0b0d317f56d55f826435a27b
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon,  4 May 2026 16:02:55 +0200

more logging

Diffstat:
Msrc/backend/paivana-httpd_cookie.c | 15++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/backend/paivana-httpd_cookie.c b/src/backend/paivana-httpd_cookie.c @@ -56,6 +56,11 @@ compute_cookie_hash (struct GNUNET_TIME_Timestamp cur_time, { struct GNUNET_TIME_AbsoluteNBO e; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Computing cookie for %s at %llu and client %s\n", + website, + (unsigned long long) cur_time.abs_time.abs_time_us, + TALER_b2s (ca, ca_len)); e = GNUNET_TIME_absolute_hton (cur_time.abs_time); GNUNET_assert (GNUNET_YES == GNUNET_CRYPTO_hkdf_gnunet ( @@ -122,9 +127,13 @@ PAIVANA_HTTPD_check_cookie (const char *cookie, ca_len, ca, &h); - return (0 == - GNUNET_memcmp (&c, - &h)); + if (0 == + GNUNET_memcmp (&c, + &h)) + return true; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Cookie hash does not match!\n"); + return false; }