Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSRF mismatch among tabs when reissued via session creation, timeout, or logout #2

Open
mswinehart opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mswinehart
Copy link

mswinehart commented May 6, 2024

Describe the Bug

Occasional CSRF mismatch when using multiple tabs to access Bookstack. Tabs that should receive the same session cookie as another sometimes are desynced with conflicting CSRF.

Steps to Reproduce

  1. Two tabs of bookstack open at the login page.
  2. A user can use one page to log in to the app, do their thing and then close that tab.
  3. Come back in a few minutes to the other previously open login tab, attempt a login and they'll receive a 419.

Similar thing occurs if your session is ended and you're kicked back to the login screen. If that tab is still open in the browser when you click a link open from an email/text, it will return the same 419 after login.

It's also difficult to get out of for users who aren't familiar with the error. You have to close the tab and navigate to the site again, as there doesn't seem to be an attempt to reissue an unauthorized session. You can't just reload the page.

Expected Behaviour

Expected CSRF would be reissued across sessions within the same browser on certain actions

Screenshots or Additional Context

No response

Browser Details

Chrome and Safari (haven't tested firefox yet)

Exact BookStack Version

v24.02.3

PHP Version

No response

Hosting Environment

22.04

Related Issue from Bookstack Repo

BookStackApp#4982

@mswinehart mswinehart added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant