Blame SOURCES/0015-pick-OIDC_SET_COOKIE_APPEND-over-ext-passed-in-to-oi.patch

50cc55
From 914f700cd791d370cf363d408e938598023980dc Mon Sep 17 00:00:00 2001
50cc55
From: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
50cc55
Date: Sun, 19 Jan 2020 16:00:31 +0100
50cc55
Subject: [PATCH 15/19] pick OIDC_SET_COOKIE_APPEND over ext passed in to
50cc55
 oidc_util_set_cookie
50cc55
50cc55
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
50cc55
(cherry picked from commit 5aa73817172acbb9e86287a54bc4532af7e394ee)
50cc55
---
50cc55
 src/util.c | 5 ++---
50cc55
 1 file changed, 2 insertions(+), 3 deletions(-)
50cc55
50cc55
diff --git a/src/util.c b/src/util.c
50cc55
index 993718e..c1fa5f3 100644
50cc55
--- a/src/util.c
50cc55
+++ b/src/util.c
50cc55
@@ -980,13 +980,12 @@ void oidc_util_set_cookie(request_rec *r, const char *cookieName,
50cc55
 		headerString = apr_psprintf(r->pool, "%s; %s", headerString,
50cc55
 				OIDC_COOKIE_FLAG_HTTP_ONLY);
50cc55
 
50cc55
-	if (ext != NULL)
50cc55
-		headerString = apr_psprintf(r->pool, "%s; %s", headerString, ext);
50cc55
-
50cc55
 	appendString = oidc_util_set_cookie_append_value(r, c);
50cc55
 	if (appendString != NULL)
50cc55
 		headerString = apr_psprintf(r->pool, "%s; %s", headerString,
50cc55
 				appendString);
50cc55
+	else if (ext != NULL)
50cc55
+		headerString = apr_psprintf(r->pool, "%s; %s", headerString, ext);
50cc55
 
50cc55
 	/* sanity check on overall cookie value size */
50cc55
 	if (strlen(headerString) > OIDC_COOKIE_MAX_SIZE) {
50cc55
-- 
50cc55
2.26.2
50cc55