getgrav / getgrav/grav-plugin-admin
Hard refresh on some page causes admin session to be invalidated
- Dominant language
- PHP
- Stars
- 377
- Forks
- 225
- Avg merge
- 11h 51m
- Merged PRs (30d)
- 4
Description
### Scenario:
» I log into the administration panel.
» A new session token is created within _Redis_ store:
```redis
127.0.0.1:6379> keys GRAV*
1) "GRAV6c34pc22kr2af2ibla849nu9j3"
```
» I open a new tab and go to the website homepage (`https://foo.com/blog/`), then (hard or not) refresh that tab (in other words either hit Ctrl+F5 or F5 alone).
» A new session token is created, _Redis_ store now looks like this:
```redis
127.0.0.1:6379> keys GRAV*
1) "GRAV386bnjt2jreue9hg4mpntk7eab"
2) "GRAV6c34pc22kr2af2ibla849nu9j3"
```
» I can see that the 1rst session token has been replaced by the new token within the cookie.
» Now, getting back to the admin panel's tab and attempting to navigate anywhere in the admin section will result in a redirect to the administration login page.
_Isn't the "session.split" option meant to circumvent this?_
### Context:
Website is exposed as a sub-directory : `https://foo.com/blog`.
The admin panel is accessible via a custom root `/manage` (`https://foo.com/blog/manage`).
» Using PHP/Redis session handler
```ini
php_admin_value[session.save_handler] = redis
php_admin_flag[session.cookie_secure] = true
```
» user/config/system.yaml
```yaml
custom_base_url: /blog
# ...
session:
enabled: true
initialize: true
timeout: 1800
name: grav-site
uniqueness: path
secure: true
httponly: true
split: true
path: /blog/
```
_Has probably nothing to do with the browser ... anyway:_
Firefox 84.0b3 (64-bit) ; Google Chrome Version 83.0.4103.116
Contributor guide
Assessment
This issue has not been assessed yet.