Merge branch 'master' of github.com:grafana/grafana

This commit is contained in:
Torkel Ödegaard 2016-06-08 08:10:22 +02:00
commit 7d6cda4916
3 changed files with 4 additions and 4 deletions

View File

@ -290,7 +290,7 @@ facility =
# Syslog tag. By default, the process' argv[0] is used. # Syslog tag. By default, the process' argv[0] is used.
tag = tag =
#################################### AMPQ Event Publisher ########################## #################################### AMQP Event Publisher ##########################
[event_publisher] [event_publisher]
enabled = false enabled = false
rabbitmq_url = amqp://localhost/ rabbitmq_url = amqp://localhost/

View File

@ -258,7 +258,7 @@ check_for_updates = true
# Expired days of log file(delete after max days), default is 7 # Expired days of log file(delete after max days), default is 7
;max_days = 7 ;max_days = 7
#################################### AMPQ Event Publisher ########################## #################################### AMQP Event Publisher ##########################
[event_publisher] [event_publisher]
;enabled = false ;enabled = false
;rabbitmq_url = amqp://localhost/ ;rabbitmq_url = amqp://localhost/

View File

@ -291,7 +291,7 @@ func (a *ldapAuther) searchForUser(username string) (*ldapUserInfo, error) {
a.server.Attr.Name, a.server.Attr.Name,
a.server.Attr.MemberOf, a.server.Attr.MemberOf,
}, },
Filter: strings.Replace(a.server.SearchFilter, "%s", username, -1), Filter: strings.Replace(a.server.SearchFilter, "%s", ldap.EscapeFilter(username), -1),
} }
searchResult, err = a.conn.Search(&searchReq) searchResult, err = a.conn.Search(&searchReq)
@ -324,7 +324,7 @@ func (a *ldapAuther) searchForUser(username string) (*ldapUserInfo, error) {
if a.server.GroupSearchFilterUserAttribute == "" { if a.server.GroupSearchFilterUserAttribute == "" {
filter_replace = getLdapAttr(a.server.Attr.Username, searchResult) filter_replace = getLdapAttr(a.server.Attr.Username, searchResult)
} }
filter := strings.Replace(a.server.GroupSearchFilter, "%s", filter_replace, -1) filter := strings.Replace(a.server.GroupSearchFilter, "%s", ldap.EscapeFilter(filter_replace), -1)
if ldapCfg.VerboseLogging { if ldapCfg.VerboseLogging {
log.Info("LDAP: Searching for user's groups: %s", filter) log.Info("LDAP: Searching for user's groups: %s", filter)