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

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