Skip to content

mirkoSekulic/gitea-redirect-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Gitea redirection bug

When Gitea is hosted with a subUrl (e.g., studio.localhost/repos), there seems to be a problem with redirection.

If you provide the redirect parameter as “/”, Gitea should redirect to the root (“/”). However, it currently redirects to “/repos”, which is a gitea home page. Similarly, if you pass any other parameter (e.g., “/redirected”) as the redirect_to parameter, Gitea redirects to the Gitea homepage rather than the specified page. The same issue exists with the OIDC (OpenID Connect) flow.

Steps to Reproduce

  1. Add the following line to your /etc/hosts file:
127.0.0.1 studio.localhost
  1. Run the following command to start the Docker containers:
docker-compose up -d
  1. Create an admin user using the following command:
docker exec gitea gitea admin user create --username adminUser --password test1234$ --email admin@localhost --admin
  1. Open the link http://studio.localhost in your browser.
  2. Click the "Login with Redirect" button.
  3. Enter the credentials for the adminUser account (username: adminUser, password: test1234$).
  4. Observe that redirection occurs to the Gitea home page.

Notes

If redirection is successful, the page with the content "Redirected after Gitea login" should be displayed. To verify the expected redirection behavior, use 1.21.10-rootless image in compose.yaml file. The bug is introduced after version 1.21.10

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published