summaryrefslogtreecommitdiffstats
path: root/routers
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
parent9085dfa42663e826c405996a44729bb0428bb201 (diff)
downloadgitea-617bbe3feec23f2c7cb5c32df8532999fda74203.tar.gz
gitea-617bbe3feec23f2c7cb5c32df8532999fda74203.zip
Fix #218
Diffstat (limited to 'routers')
-rw-r--r--routers/install.go1
-rw-r--r--routers/repo/repo.go4
2 files changed, 4 insertions, 1 deletions
diff --git a/routers/install.go b/routers/install.go
index f173563960..e49595f72b 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -47,6 +47,7 @@ func NewServices() {
func GlobalInit() {
setting.NewConfigContext()
log.Trace("Custom path: %s", setting.CustomPath)
+ log.Trace("Log path: %s", setting.LogRootPath)
mailer.NewMailerContext()
models.LoadModelsConfig()
models.LoadRepoConfig()
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 {