Skip to content
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

creating migration with ".git" suffix in repo name causes 500 error #3799

Closed
1 of 4 tasks
tycho opened this issue Apr 15, 2018 · 4 comments
Closed
1 of 4 tasks

creating migration with ".git" suffix in repo name causes 500 error #3799

tycho opened this issue Apr 15, 2018 · 4 comments
Labels
topic/ui Change the appearance of the Gitea UI type/bug

Comments

@tycho
Copy link

tycho commented Apr 15, 2018

  • Gitea version (or commit ref): 1.4.0
  • Git version: 2.17.0
  • Operating system: Linux 4.16.2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite

Description

Creating a migration repository mirror with the name "whatever.git" causes this error to show up in the log:

2018/04/15 08:01:16 [...routers/repo/repo.go:146 handleCreateError()] [E] MigratePost: name pattern is not allowed [pattern: *.git]

but it also causes an error 500 on the web page, which tells me exactly nothing about what happened.

Screenshots

I'm not going to just screenshot the error 500 page. 😉

@lafriks lafriks added type/bug topic/ui Change the appearance of the Gitea UI labels Apr 19, 2018
@techknowlogick
Copy link
Member

Are you able to replicate this on try.gitea.io?
What happens if you name the migration on your instance without the .git suffix (just trying to see if the repo itself causes issues, as I've run into this with some repos. And yes I do see your error where it specifically mentions the name of the repo, just being extra thorough)

@tycho
Copy link
Author

tycho commented Apr 20, 2018

Yes. If I remove the .git suffix it probably works fine, but a 500 error is obviously not the right user experience. It should probably also automatically drop the .git suffix (or have some JS-level evaluation for that field to notify the user).

@techknowlogick
Copy link
Member

I agree.

Currently it'll show an error if the git repo doesn't exist, to keep user experience the same the suffix check could be done similarly.

Screenshot of what the error looks like (excuse the dark look I have a custom theme applied to my instance):
screen shot 2018-04-20 at 6 12 17 pm

@lunny lunny added this to the 1.x.x milestone Apr 21, 2018
@lunny
Copy link
Member

lunny commented Dec 9, 2018

Cannot reproduce this on master when remote is exist. Closed now and please feel free to reopen it.

@lunny lunny closed this as completed Dec 9, 2018
@lunny lunny removed this from the 1.x.x milestone Dec 9, 2018
@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
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

4 participants