summaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-20 17:32:34 -0500
committerUnknwon <u@gogs.io>2016-02-20 17:32:34 -0500
commit926e75d72126be97f9974976abfb46449a53f3c6 (patch)
tree58aeea38dd9d4979e4d6646aa0fff4dd10dc178a /modules/auth
parentd5a3021a7d86a6dbf42df97c5c25e22b0b3f9505 (diff)
downloadgitea-926e75d72126be97f9974976abfb46449a53f3c6.tar.gz
gitea-926e75d72126be97f9974976abfb46449a53f3c6.zip
#2334 strip whitespace for migrate URL
Also fix a possible race condition while install
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/repo_form.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go
index bd68feafcf..333f468a1c 100644
--- a/modules/auth/repo_form.go
+++ b/modules/auth/repo_form.go
@@ -57,7 +57,7 @@ func (f *MigrateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) bi
// It also checks if given user has permission when remote address
// is actually a local path.
func (f MigrateRepoForm) ParseRemoteAddr(user *models.User) (string, error) {
- remoteAddr := f.CloneAddr
+ remoteAddr := strings.TrimSpace(f.CloneAddr)
// Remote address can be HTTP/HTTPS/Git URL or local path.
if strings.HasPrefix(remoteAddr, "http://") ||