You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/web
cassiozareck 73fb1ecdcf
Fixing redirection issue for logged-in users (#26105)
This PR addresses an issue where logged-in users get redirected to the
homepage when trying to access a URL with the redirect_to parameter. The
issue was traced back to a middleware function in
services/auth/middleware.go that redirects logged-in users to the
homepage. This function didn't account the redirect_to parameter.

The fix modifies the middleware function to check for this case and
redirect the user to the specified URL instead of the homepage.

Closes: #26005

---------

Signed-off-by: cassiozareck <cassiomilczareck@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 years ago
..
admin Move web JSON functions to web context and simplify code (#26132) 2 years ago
auth Move web JSON functions to web context and simplify code (#26132) 2 years ago
devtest Make "cancel" buttons have proper type in modal forms (#25618) 2 years ago
events Implement FSFE REUSE for golang files (#21840) 2 years ago
explore Replace `interface{}` with `any` (#25686) 2 years ago
feed Add context parameter to some database functions (#26055) 2 years ago
healthcheck Remove `db.DefaultContext` in `routers/` and `cmd/` (#26076) 2 years ago
misc Serve pre-defined files in "public", add "security.txt", add CORS header for ".well-known" (#25974) 2 years ago
org Move web JSON functions to web context and simplify code (#26132) 2 years ago
repo Improve display of Labels/Projects/Assignees sort options (#25886) 2 years ago
shared Move web JSON functions to web context and simplify code (#26132) 2 years ago
user Move web JSON functions to web context and simplify code (#26132) 2 years ago
auth.go Implement FSFE REUSE for golang files (#21840) 2 years ago
auth_windows.go Implement FSFE REUSE for golang files (#21840) 2 years ago
base.go Fix all possible setting error related storages and added some tests (#23911) 2 years ago
goget.go Support SSH for go get (#24664) 2 years ago
home.go Refactor cookie (#24107) 2 years ago
metrics.go Implement FSFE REUSE for golang files (#21840) 2 years ago
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
swagger_json.go Group template helper functions, remove `Printf`, improve template error messages (#23982) 2 years ago
web.go Fixing redirection issue for logged-in users (#26105) 2 years ago
webfinger.go Add a link to OpenID Issuer URL in WebFinger response (#26000) 2 years ago