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

[stable30] fix: Redirect user to login if session is terminated #49940

Merged
merged 2 commits into from
Jan 16, 2025

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/stable30 branch from 6b51d72 to f5f3ae2 Compare January 9, 2025 08:48
@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 09:56
@solracsf solracsf mentioned this pull request Jan 9, 2025
17 tasks
@susnux susnux merged commit d787ae9 into stable30 Jan 16, 2025
117 checks passed
@susnux susnux deleted the backport/49208/stable30 branch January 16, 2025 22:44
@Altahrim Altahrim mentioned this pull request Feb 5, 2025
15 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.

4 participants