summaryrefslogtreecommitdiffstats
path: root/routers/repo/repo.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-30 06:34:24 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-30 06:34:24 -0400
commit617bbe3feec23f2c7cb5c32df8532999fda74203 (patch)
tree74b5cc06482fa823d2436015ad9b2df7117d93ef /routers/repo/repo.go
parent9085dfa42663e826c405996a44729bb0428bb201 (diff)
downloadgitea-617bbe3feec23f2c7cb5c32df8532999fda74203.tar.gz
gitea-617bbe3feec23f2c7cb5c32df8532999fda74203.zip
Fix #218
Diffstat (limited to 'routers/repo/repo.go')
-rw-r--r--routers/repo/repo.go4
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 {