0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 13:44:13 +01:00

Add missing safety check

This commit is contained in:
Martin Hartkorn 2016-02-14 21:22:36 +01:00
parent 3650bd8528
commit 15394f613f

View file

@ -154,6 +154,11 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
}
}
if !repo.IsMirror {
ctx.Error(404)
return
}
repo.IsMirror = false
if _, err := models.FinishMigrateRepository(repo, models.RepoPath(ctx.Repo.Owner.Name, repo.Name)); err != nil {