diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-30 06:34:24 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-30 06:34:24 -0400 |
commit | 617bbe3feec23f2c7cb5c32df8532999fda74203 (patch) | |
tree | 74b5cc06482fa823d2436015ad9b2df7117d93ef /routers/repo/repo.go | |
parent | 9085dfa42663e826c405996a44729bb0428bb201 (diff) | |
download | gitea-617bbe3feec23f2c7cb5c32df8532999fda74203.tar.gz gitea-617bbe3feec23f2c7cb5c32df8532999fda74203.zip |
Fix #218
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r-- | routers/repo/repo.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go index a5a0b2aa26..286f558b6e 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -80,7 +80,9 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) { return } - url := strings.Replace(form.Url, "://", fmt.Sprintf("://%s:%s@", form.AuthUserName, form.AuthPasswd), 1) + authStr := strings.Replace(fmt.Sprintf("://%s:%s", + form.AuthUserName, form.AuthPasswd), "@", "%40", -1) + url := strings.Replace(form.Url, "://", authStr, 1) + "@" repo, err := models.MigrateRepository(ctx.User, form.RepoName, form.Description, form.Private, form.Mirror, url) if err == nil { |