1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

#3295 fix wrong logic judgement

This commit is contained in:
Unknwon
2016-07-21 14:15:04 +08:00
parent 1c7dcdd6b9
commit 57af7432fc
4 changed files with 4 additions and 4 deletions

View File

@@ -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)
}