{"action":"closed","issue":{"url":"https://api.github.com/repos/pac4j/play-pac4j/issues/137","repository_url":"https://api.github.com/repos/pac4j/play-pac4j","labels_url":"https://api.github.com/repos/pac4j/play-pac4j/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/pac4j/play-pac4j/issues/137/comments","events_url":"https://api.github.com/repos/pac4j/play-pac4j/issues/137/events","html_url":"https://github.com/pac4j/play-pac4j/issues/137","id":176524066,"number":137,"title":"CsrfAuthorizer authorises all requests after session token expires","user":{"login":"othrayte","id":241372,"avatar_url":"https://avatars.githubusercontent.com/u/241372?v=3","gravatar_id":"","url":"https://api.github.com/users/othrayte","html_url":"https://github.com/othrayte","followers_url":"https://api.github.com/users/othrayte/followers","following_url":"https://api.github.com/users/othrayte/following{/other_user}","gists_url":"https://api.github.com/users/othrayte/gists{/gist_id}","starred_url":"https://api.github.com/users/othrayte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/othrayte/subscriptions","organizations_url":"https://api.github.com/users/othrayte/orgs","repos_url":"https://api.github.com/users/othrayte/repos","events_url":"https://api.github.com/users/othrayte/events{/privacy}","received_events_url":"https://api.github.com/users/othrayte/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-13T01:14:00Z","updated_at":"2016-09-16T06:28:49Z","closed_at":"2016-09-16T06:28:49Z","body":"The `CsrfAuthorizer` seems to consider not having a `sessionToken` (`== null`) as authorized if either parameter or header token are missing (`== null`). As I only set the header token results in all requests after the token expires as being authorized.\r\n\r\nSo far the work around has been to create a custom `CsrfAuthorizer` that additionally checks that the `sessionToken` is not `null` at [CsrfAuthorizer.java#L47](https://github.com/pac4j/pac4j/blob/f8ef2f3288001773423c878769a6b0dd7c10a5e0/pac4j-core/src/main/java/org/pac4j/core/authorization/authorizer/csrf/CsrfAuthorizer.java#L47).\r\n\r\nLooking into why the `sessionToken` was `null` revealed that the `PlayCacheStore` returns `null` if requesting the `sessionToken` after it has expired."}}
{"actor":{"display_login":"leleuj"}}