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

36 lines
1.2 KiB
Diff

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