summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2020-01-11 17:25:16 +0200
committerGitHub <noreply@github.com>2020-01-11 17:25:16 +0200
commitb1a90f72862b0a3323d740c4a95f49a4652b36d1 (patch)
tree8f4d08281453156c282bce230a51cd87b1ca1d04
parent45c8a3aeeb4c47935e89d9c8b48aa01b7bac400d (diff)
downloadgitea-b1a90f72862b0a3323d740c4a95f49a4652b36d1.tar.gz
gitea-b1a90f72862b0a3323d740c4a95f49a4652b36d1.zip
Hide credentials when submitting migration (#9102) (#9704)
through API. Same fix, using form.CloneAddr instead of opts.CloneAddr. Co-authored-by: Jordan <eatsleepgame@gmail.com>
-rw-r--r--routers/api/v1/repo/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index 7eb397b68c..0c1db2c226 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -436,7 +436,7 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) {
repo, err := models.CreateRepository(ctx.User, ctxUser, models.CreateRepoOptions{
Name: opts.RepoName,
Description: opts.Description,
- OriginalURL: opts.CloneAddr,
+ OriginalURL: form.CloneAddr,
IsPrivate: opts.Private,
IsMirror: opts.Mirror,
Status: models.RepositoryBeingMigrated,