0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-28 18:34:10 -05:00
forgejo/modules/context
Yarden Shoham ef95d1d533
Fix htmx rendering the login page in frame on session logout (#29405)
- Fix #29391

With this change, htmx will not follow the redirect in the AJAX request
but instead redirect the whole browser.

To reproduce the bug fixed by this change without waiting a long time
for the token to expire, you can logout in another tab then look in the
original tab. Just make sure to comment out both instances of
`window.location.href = appSubUrl` in the codebase so you won't be
redirected immediately on logout. This is what I did in the following
gifs.

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit 324626a11c041208b003ee64e33000b223994662)
2024-03-06 12:10:43 +08:00
..
access_log.go
api.go Use the database object format name but not read from git repoisitory everytime and fix possible migration wrong objectformat when migrating a sha256 repository (#29294) 2024-02-26 22:30:26 +01:00
api_org.go
api_test.go
base.go Fix htmx rendering the login page in frame on session logout (#29405) 2024-03-06 12:10:43 +08:00
captcha.go
context.go Allow instance-wide disabling of forking 2024-02-25 12:00:17 +01:00
context_cookie.go [SECURITY] Rework long-term authentication 2024-02-05 15:06:15 +01:00
context_model.go
context_request.go
context_response.go Refactor more code in templates (#29236) 2024-02-19 22:58:32 +01:00
context_template.go Remove DataRaceCheck (#29258) 2024-02-19 22:58:33 +01:00
context_test.go
csrf.go
org.go Unify organizations header (#29248) 2024-02-26 22:30:26 +01:00
package.go Prevent anonymous container access if RequireSignInView is enabled (#28877) 2024-01-21 16:31:29 +00:00
pagination.go
permission.go
private.go
repo.go Use the database object format name but not read from git repoisitory everytime and fix possible migration wrong objectformat when migrating a sha256 repository (#29294) 2024-02-26 22:30:26 +01:00
response.go
utils.go
xsrf.go
xsrf_test.go