{"action":"created","issue":{"url":"https://api.github.com/repos/colinmollenhour/Cm_RedisSession/issues/104","repository_url":"https://api.github.com/repos/colinmollenhour/Cm_RedisSession","labels_url":"https://api.github.com/repos/colinmollenhour/Cm_RedisSession/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/colinmollenhour/Cm_RedisSession/issues/104/comments","events_url":"https://api.github.com/repos/colinmollenhour/Cm_RedisSession/issues/104/events","html_url":"https://github.com/colinmollenhour/Cm_RedisSession/issues/104","id":206664557,"node_id":"MDU6SXNzdWUyMDY2NjQ1NTc=","number":104,"title":"Gone in 60 seconds when \"admin/security/session_cookie_lifetime\" not set","user":{"login":"jeroenvermeulen","id":658024,"node_id":"MDQ6VXNlcjY1ODAyNA==","avatar_url":"https://avatars1.githubusercontent.com/u/658024?v=4","gravatar_id":"","url":"https://api.github.com/users/jeroenvermeulen","html_url":"https://github.com/jeroenvermeulen","followers_url":"https://api.github.com/users/jeroenvermeulen/followers","following_url":"https://api.github.com/users/jeroenvermeulen/following{/other_user}","gists_url":"https://api.github.com/users/jeroenvermeulen/gists{/gist_id}","starred_url":"https://api.github.com/users/jeroenvermeulen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeroenvermeulen/subscriptions","organizations_url":"https://api.github.com/users/jeroenvermeulen/orgs","repos_url":"https://api.github.com/users/jeroenvermeulen/repos","events_url":"https://api.github.com/users/jeroenvermeulen/events{/privacy}","received_events_url":"https://api.github.com/users/jeroenvermeulen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-02-09T23:44:33Z","updated_at":"2018-12-14T07:41:53Z","closed_at":null,"author_association":"NONE","body":"Hi @colinmollenhour,\r\n\r\nToday we had the second case of a shop having the problem of being kicked out of the backend after only 60 seconds of inactivity. You can image this is a frustrating situation for shop owners.\r\nSo I investigated a bit deeper this time.\r\n\r\nI discovered in these shops the config field `admin/security/session_cookie_lifetime` was empty.\r\nIn [Model/Session/Config.php line 130](https://github.com/colinmollenhour/Cm_RedisSession/blob/master/code/Model/Session/Config.php#L129-L130) this config field is retrieved. When the field is empty, the result will be NULL and later on the value of `min_lifetime` from `local.xml` will be used.\r\n\r\n**Would it help if I propose a pull request with a fix for this, or maybe you can create a quick fix for it yourself?**\r\n\r\nFor these customers the solution was simply to set the config field, which I used N98 for:\r\n```\r\nn98-magerun.phar config:get admin/security/session_cookie_lifetime | grep -P \"Couldn't find|NULL\" &&  n98-magerun.phar config:set admin/security/session_cookie_lifetime 3600 && n98-magerun.phar cache:clean config\r\n```\r\nFor the future it would be nice to have this fixed, so other people don't need to investigate the same problem. I don't know how the config field became empty. Can't image both of these customers did it on purpose."},"comment":{"url":"https://api.github.com/repos/colinmollenhour/Cm_RedisSession/issues/comments/447241990","html_url":"https://github.com/colinmollenhour/Cm_RedisSession/issues/104#issuecomment-447241990","issue_url":"https://api.github.com/repos/colinmollenhour/Cm_RedisSession/issues/104","id":447241990,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzI0MTk5MA==","user":{"login":"sprankhub","id":930199,"node_id":"MDQ6VXNlcjkzMDE5OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/930199?v=4","gravatar_id":"","url":"https://api.github.com/users/sprankhub","html_url":"https://github.com/sprankhub","followers_url":"https://api.github.com/users/sprankhub/followers","following_url":"https://api.github.com/users/sprankhub/following{/other_user}","gists_url":"https://api.github.com/users/sprankhub/gists{/gist_id}","starred_url":"https://api.github.com/users/sprankhub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprankhub/subscriptions","organizations_url":"https://api.github.com/users/sprankhub/orgs","repos_url":"https://api.github.com/users/sprankhub/repos","events_url":"https://api.github.com/users/sprankhub/events{/privacy}","received_events_url":"https://api.github.com/users/sprankhub/received_events","type":"User","site_admin":false},"created_at":"2018-12-14T07:41:53Z","updated_at":"2018-12-14T07:41:53Z","author_association":"CONTRIBUTOR","body":"The issue is that by default, if `admin/security/session_cookie_lifetime` is empty (which is the default!), Magento falls back to the normal cookie lifetime, which is 3600 by default. Hence, what happened for me was:\r\n\r\n* Used file session storage. Admin sessions were active for 3600 seconds.\r\n* Switched to `Cm_RedisSession`. Noticed that the admin session was only active for 60 seconds.\r\n* Searched for the solution. Found out that when using this module, the config value `admin/security/session_cookie_lifetime` needs to be set.\r\n\r\nThis is not the way I would expect. Usually, switching the session backend should not change the session lifetime IMHO."}}
{"actor":{"display_login":"sprankhub"}}