[
https://issues.apache.org/jira/browse/KNOX-3232?focusedWorklogId=996224&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-996224
]
ASF GitHub Bot logged work on KNOX-3232:
----------------------------------------
Author: ASF GitHub Bot
Created on: 15/Dec/25 13:59
Start Date: 15/Dec/25 13:59
Worklog Time Spent: 10m
Work Description: github-actions[bot] commented on PR #1132:
URL: https://github.com/apache/knox/pull/1132#issuecomment-3655792287
## Test Results
7 tests 7 ✅ 1s ⏱️
1 suites 0 💤
1 files 0 ❌
Results for commit c7fa377a.
[test-results]:data:application/gzip;base64,H4sIAFYUQGkC/1WMSQ7DIBAEv2JxzsEE4SH5TESAkUZeiFhOVv4e7HjBt65qqWaGNLjIng2/NSxmSgfYHHQiP21YjrRcsO9XzMZcRU+fItpDoKbhIlwIPmwm5GnvLbPO/fmsrVzFVq5bxo8jpQLMAGoBoF3HlRUShLu/rULFZau5k4AohX1gx74/TtOK//sAAAA=
Issue Time Tracking
-------------------
Worklog Id: (was: 996224)
Time Spent: 20m (was: 10m)
> Handle pac4j cookies with "null" value
> --------------------------------------
>
> Key: KNOX-3232
> URL: https://issues.apache.org/jira/browse/KNOX-3232
> Project: Apache Knox
> Issue Type: Task
> Components: KnoxSSO
> Affects Versions: 3.0.0
> Reporter: Tamás Marcinkovics
> Assignee: Tamás Marcinkovics
> Priority: Major
> Attachments: knoxsso-cas-test.xml
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When testing Knox SSO with Pac4j and CAS, if the user clicks on global
> logout, and does not close the browser, refreshing the homepage link results
> in a 500 internal server error due to KnoxSessionStore not being able to get
> the value of CasClient$attemptedAuthentication cookie.
> When pac4j calls the
> KnoxSessionStore.set() method with null value, we will add a
> Set-Cookie-Header with "null" value instead of empty.
> setCookieHeader = new SetCookieHeader(PAC4J_SESSION_PREFIX + key, null);
> When KnoxSessionStore.get() is called, it tries to uncompress the non-empty
> value and fails with a BufferUnderflowException.
>
> To test, replace the conf/knoxsso.xml with the contents of the attached
> knoxsso-cas-test.xml and set global logout in gateway-site.xml by setting the
> properties
> {noformat}
> <property>
> <name>knox.homepage.logout.enabled</name>
> <value>true</value>
> </property>
> <property>
> <name>knox.global.logout.page.url</name>
> <value>https://casserverpac4j.herokuapp.com/logout</value>
> </property>
> {noformat}
>
> Then log in to CAS using the same username and password, then in the knox
> homepage press the logout and global logout link afterwards.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)