summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-07-21 14:15:04 +0800
committerUnknwon <u@gogs.io>2016-07-21 14:15:04 +0800
commit57af7432fc07f630e435228a306a9deeb3fefa1e (patch)
tree6ba47956027d61989c34c3da427f75d72c58168a /models
parent1c7dcdd6b948b9c177b5ed4e036e612508ee9832 (diff)
downloadgitea-57af7432fc07f630e435228a306a9deeb3fefa1e.tar.gz
gitea-57af7432fc07f630e435228a306a9deeb3fefa1e.zip
#3295 fix wrong logic judgement
Diffstat (limited to 'models')
-rw-r--r--models/login.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/login.go b/models/login.go
index 84f17d18e5..dd90c5d86e 100644
--- a/models/login.go
+++ b/models/login.go
@@ -296,7 +296,7 @@ func LoginUserLDAPSource(u *User, loginName, passwd string, source *LoginSource,
username = loginName
}
// Validate username make sure it satisfies requirement.
- if !binding.AlphaDashDotPattern.MatchString(username) {
+ if binding.AlphaDashDotPattern.MatchString(username) {
return nil, fmt.Errorf("Invalid pattern for attribute 'username' [%s]: must be valid alpha or numeric or dash(-_) or dot characters", username)
}