Skip to content

404 error on View File for Commits with Spaces in File/Folder #12872

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

Closed
2 of 7 tasks
Svra44 opened this issue Sep 16, 2020 · 1 comment
Closed
2 of 7 tasks

404 error on View File for Commits with Spaces in File/Folder #12872

Svra44 opened this issue Sep 16, 2020 · 1 comment
Labels

Comments

@Svra44
Copy link

Svra44 commented Sep 16, 2020

  • Gitea version (or commit ref): 1.12.4
  • Git version: 2.20.1
  • Operating system: Debian 10.5
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

gitea[10132]: [Macaron] 2020-09-16 22:45:50: Started GET /TestUser1/tmpGit/src/commit/23bfc188a8d3fed0156640551136192fbe2588d7/th for 192.168.0.10
gitea[10132]: [Macaron] 2020-09-16 22:45:50: Completed GET /TestUser1/tmpGit/src/commit/23bfc188a8d3fed0156640551136192fbe2588d7/th 404 Not Found in 4.921573ms

gitea[10132]: [Macaron] 2020-09-16 22:48:26: Started GET /TestUser1/tmpGit/src/commit/23bfc188a8d3fed0156640551136192fbe2588d7/file%20with%20spaces.txt for 127.0.0.1
gitea[10132]: [Macaron] 2020-09-16 22:48:26: Completed GET /TestUser1/tmpGit/src/commit/23bfc188a8d3fed0156640551136192fbe2588d7/file%20with%20spaces.txt 200 OK in 7.585426ms

Description

Gitea appears to incorrectly handle the "View File" option when viewing commits to files with spaces either in the file name, or in the containing directory structure.
Have tested in both FF 80.0.1 & Chromium 85.0.4183.102

When accessing a commit view, & selecting the "View File" option, it redirects to an incorrect link.
Example:

Tested directly against gitea localhost:3000 bind, taking reverse proxy out of the chain.
Same git repo uploaded to try.gitea.io doesnt exhibit the same issue.

Screenshots

image
image
image

@lunny lunny added the type/bug label Sep 17, 2020
@mrsdizzie
Copy link
Member

Duplicate of #12768 and should be fixed in 1.12.5 by #12776

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants