[ 
https://issues.apache.org/jira/browse/KNOX-3599?focusedWorklogId=1056016&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1056016
 ]

ASF GitHub Bot logged work on KNOX-3599:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Nov/26 21:26
            Start Date: 19/Nov/26 21:26
    Worklog Time Spent: 10m 
      Work Description: bonampak opened a new pull request, #1530:
URL: https://github.com/apache/knox/pull/1530

   
   
   [KNOX-3599](https://issues.apache.org/jira/browse/KNOX-3599) - Write empty 
pac4j session cookie instead of "null"
   
   ## What changes were proposed in this pull request?
   
   When pac4j clears a session value with set(key, null), KnoxSessionStore must 
emit an empty-value cookie. 
   Since KNOX-3148 SetCookieHeader wrote the literal "null" instead. Write a 
null value as empty, as before.
   
   ## How was this patch tested?
   
   Unit test. An E2E with pac4j oidc or SAML client is still needed.
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 1056016)
    Remaining Estimate: 0h
            Time Spent: 10m

> KnoxSessionStore writes "null" instead of an empty cookie when pac4j clears a 
> session value
> -------------------------------------------------------------------------------------------
>
>                 Key: KNOX-3599
>                 URL: https://issues.apache.org/jira/browse/KNOX-3599
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: KnoxSSO
>    Affects Versions: 3.1.0
>            Reporter: Tamás Marcinkovics
>            Assignee: Tamás Marcinkovics
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> KnoxSessionStore is pac4j's cookie-backed session store. 
> pac4j clears a session value with set(key, null) (also ""), which should give 
> an empty-value cookie (pac4j.session.<key>=). 
> Since KNOX-3148, SetCookieHeader writes the value as the literal string 
> "null" (pac4j.session.<key>=null).
> get() would then try to decode "null" as a stored value.
> KNOX-3232 worked around this on the read side only.
> SetCookieHeader should write a null value as empty, which is what the code 
> did before KNOX-3148.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to