diff options
author | James Moger <james.moger@gitblit.com> | 2014-03-31 12:20:58 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-03-31 12:20:58 -0400 |
commit | e5c982fa61f9f1b289d7454bdb92ee3167ee784d (patch) | |
tree | f5437f769337f59875221f347ddb951dfeb7341a /src/main/java/com | |
parent | beb021472d034617e1ce216aee38d918ae7f1a67 (diff) | |
parent | c30c2b332cf498efef9a01609ff4aa5bd7f8cc14 (diff) | |
download | gitblit-e5c982fa61f9f1b289d7454bdb92ee3167ee784d.tar.gz gitblit-e5c982fa61f9f1b289d7454bdb92ee3167ee784d.zip |
Merge pull request #164 from jaa127/ldap-bind-escape
Ldap bind escape
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/gitblit/auth/LdapAuthProvider.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/auth/LdapAuthProvider.java b/src/main/java/com/gitblit/auth/LdapAuthProvider.java index 892f30ba..83f24669 100644 --- a/src/main/java/com/gitblit/auth/LdapAuthProvider.java +++ b/src/main/java/com/gitblit/auth/LdapAuthProvider.java @@ -299,7 +299,7 @@ public class LdapAuthProvider extends UsernamePasswordAuthenticationProvider { String bindPattern = settings.getString(Keys.realm.ldap.bindpattern, ""); if (!StringUtils.isEmpty(bindPattern)) { try { - String bindUser = StringUtils.replace(bindPattern, "${username}", simpleUsername); + String bindUser = StringUtils.replace(bindPattern, "${username}", escapeLDAPSearchFilter(simpleUsername)); ldapConnection.bind(bindUser, new String(password)); alreadyAuthenticated = true; |