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

[stable29] fix: Redirect user to login if session is terminated #49939

Open
wants to merge 2 commits into
base: stable29
Choose a base branch
from

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Dec 20, 2024

Backport of #49208

Todo

  • Review and resolve any conflicts
  • Remove all the empty commits

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

If a session timed out or was closed in another tab,
then currently the user gets random error messages.
This intercepts 401 responses (should only happen if logged out, or the
users does something wrong).

If we get a 401, we make sure its because of the session,
by checking if the user can access the files app.
If that is also the case we forward the user to the login page
and set the redirect URL to the last used URL.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@solracsf solracsf force-pushed the backport/49208/stable29 branch from 898d8da to 425e081 Compare January 9, 2025 08:39
@solracsf
Copy link
Member

solracsf commented Jan 9, 2025

/compile

Signed-off-by: nextcloud-command <[email protected]>
@solracsf solracsf marked this pull request as ready for review January 9, 2025 08:46
@blizzz blizzz mentioned this pull request Jan 9, 2025
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants