Skip to content

500 when filename starts with ':' #2373

Closed
@congeal

Description

@congeal

I tried migrating an existing repo into Gogs, but it shows 500 server error.
Log message showed like below:
routers/repo/view.go:134 Home()
[E} GetCommitsInfo: GetCommitByPath (/:source): Length must be 40.
I found out that the filename ':source' caused the error.
After I renamed the filename to be without ':', pushed the original repo and retried migration, it works without any error.
However, since the name is still starting with ':' in the other branches, the error shows whenever I change the branches.
I'd like you to fix this problem so that I don't have to rename files staring with a colon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    💊 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions