From 926e75d72126be97f9974976abfb46449a53f3c6 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 20 Feb 2016 17:32:34 -0500 Subject: #2334 strip whitespace for migrate URL Also fix a possible race condition while install --- modules/auth/repo_form.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/auth/repo_form.go') diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go index bd68feaf..333f468a 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://") || -- cgit v1.2.3