You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GetRepositoryByName uses some magic "Get" method on an partially initialized object, passing an empty string as LowerName - but empty fields are likely not used in the WHERE filter string for the databse.
Description
Hi,
URLs with an empty repository name before
.git
find "random" repositories.Example: https://gitea.com/gitea/.git/info/refs
As far as I can tell this happends because:
.git
from the:reponame
path parameter, i.e. ending up with an empty string:gitea/routers/web/repo/githttp.go
Lines 59 to 107 in 4b376a0
GetRepositoryByName
uses some magic "Get" method on an partially initialized object, passing an empty string asLowerName
- but empty fields are likely not used in theWHERE
filter string for the databse.gitea/models/repo/repo.go
Lines 747 to 759 in 4b376a0
Imho the most reliable solution is for
GetRepositoryByName
not to find repositories with empty names.cheers,
Stefan
Gitea Version
gitea.com doesn't say
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
gitea.com is your instance.
Database
None
The text was updated successfully, but these errors were encountered: