From ba9a2d2abb576c12776333300bd361bac7bf1406 Mon Sep 17 00:00:00 2001
From: Jordan <me@jba.io>
Date: Fri, 22 Nov 2019 00:37:37 -0600
Subject: [PATCH] Hide credentials when submitting migration (#9102)

through API.
Same fix, using form.CloneAddr instead of opts.CloneAddr.
---
 routers/api/v1/repo/repo.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go
index e2a3bfc873..cab0fc07e0 100644
--- a/routers/api/v1/repo/repo.go
+++ b/routers/api/v1/repo/repo.go
@@ -446,7 +446,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,