[cpp-xmltooling] branch master updated: SSPCPP-878 - SameSite workaround using second cookie
Scott Cantor
cantor.2 at osu.edu
Tue Feb 4 12:30:42 EST 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository cpp-xmltooling.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-xmltooling.git;a=commit;h=25910fb0dfde3a222f6713c81b6ce97d9658247c
The following commit(s) were added to refs/heads/master by this push:
new 25910fb SSPCPP-878 - SameSite workaround using second cookie
25910fb is described below
commit 25910fb0dfde3a222f6713c81b6ce97d9658247c
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Feb 4 12:29:28 2020 -0500
SSPCPP-878 - SameSite workaround using second cookie
https://issues.shibboleth.net/jira/browse/SSPCPP-878
Fallback is only needed when SameSite=None.
---
xmltooling/io/HTTPResponse.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/xmltooling/io/HTTPResponse.cpp b/xmltooling/io/HTTPResponse.cpp
index 9a16814..3af2301 100644
--- a/xmltooling/io/HTTPResponse.cpp
+++ b/xmltooling/io/HTTPResponse.cpp
@@ -95,6 +95,10 @@ void HTTPResponse::setCookie(const char* name, const char* value, samesite_t sam
switch (sameSiteValue) {
case SAMESITE_NONE:
ssCookie.append("None");
+ if (sameSiteFallback) {
+ string hackedName(name);
+ setResponseHeader("Set-Cookie", hackedName.append("_fgwars=").append(value).c_str());
+ }
break;
case SAMESITE_LAX:
ssCookie.append("Lax");
@@ -106,11 +110,6 @@ void HTTPResponse::setCookie(const char* name, const char* value, samesite_t sam
throw IOException("Invalid SameSite value supplied");
}
setResponseHeader("Set-Cookie", ssCookie.c_str());
-
- if (sameSiteFallback) {
- string hackedName(name);
- setResponseHeader("Set-Cookie", hackedName.append("_fgwars=").append(value).c_str());
- }
}
else {
string cookie(name);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list