[jira] [Commented] (SHIRO-637) Refresh cached session in HTTP request after user logs out

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (SHIRO-637) Refresh cached session in HTTP request after user logs out

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SHIRO-637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216599#comment-16216599 ]

ASF GitHub Bot commented on SHIRO-637:
--------------------------------------

GitHub user KPhi opened a pull request:

    https://github.com/apache/shiro/pull/72

    SHIRO-637: Refresh cached session in HTTP request when its state changes

    This pull request fixes SHIRO-637.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/KPhi/shiro SHIRO-637

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/shiro/pull/72.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #72
   
----
commit 2105c1b6a89d41f546ab24eea69e5db6186001df
Author: kp <[hidden email]>
Date:   2017-10-24T09:11:20Z

    SHIRO-637: Refresh cached session in HTTP request when its state changes

----


> Refresh cached session in HTTP request after user logs out
> ----------------------------------------------------------
>
>                 Key: SHIRO-637
>                 URL: https://issues.apache.org/jira/browse/SHIRO-637
>             Project: Shiro
>          Issue Type: Bug
>          Components: Authentication (log-in), Subject, Web
>    Affects Versions: 1.3.2
>            Reporter: Philipp Kapfer
>              Labels: easyfix, patch
>         Attachments: ShiroHttpServletRequest.patch
>
>
> For native session management in web environments, the _ShiroHttpServletRequest_ caches calls to _getSession()_ by saving a copy of the current subject's session to a member variable. This copy is never updated even when the subject logs out and the session is destroyed.
> When the session is accessed again after logout, an {{UnknownSessionException}} can be thrown because the session referenced in the request is not physically available anymore (this could be the cause for [SHIRO-614|https://issues.apache.org/jira/browse/SHIRO-614]).
> The Shiro HTTP request therefore has to check the state of the cached session and refresh it if necessary, just as the original Jetty Request class does as well.
> Please see the attached patch for a possible solution that Works For Me™



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)