commit 8ca9ef0f4128d5d086f3f03047e734fa2ac376ca
parent a5ab1015c3aea428cfffa34a144afedfd5e8afa4
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 6 Aug 2026 16:17:53 +0200
no trailing ';' in cookies as per spec
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/backend/paivana-httpd_cookie.c b/src/backend/paivana-httpd_cookie.c
@@ -184,7 +184,11 @@ PAIVANA_HTTPD_compute_cookie (struct GNUNET_TIME_Timestamp cur_time,
*end = '\0';
GNUNET_asprintf (
&res,
- PAIVANA_COOKIE_NAME "=%llu-%s; %sPath=%s; Max-Age=%llu; HttpOnly;",
+ /* RFC 6265 section 4.1.1:
+ set-cookie-string = cookie-pair *( ";" SP cookie-av )
+ -- every ';' is followed by SP and an attribute, so the value
+ must not end on one. */
+ PAIVANA_COOKIE_NAME "=%llu-%s; %sPath=%s; Max-Age=%llu; HttpOnly",
(unsigned long long) (cur_time.abs_time.abs_value_us / 1000LLU / 1000LLU),
cstr,
use_https