Skip to content

Commit

Permalink
unescape commas in attribute value used for search filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Jennings committed Oct 7, 2015
1 parent 71a0a7c commit caf8e77
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ldap_fluff/generic_member_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def find_user(uid)
def find_by_dn(dn)
entry, base = dn.split(/(?<!\\),/, 2)
entry_attr, entry_value = entry.split('=', 2)
entry_value = entry_value.gsub('\,', ',')
user = @ldap.search(:filter => name_filter(entry_value, entry_attr), :base => base)
raise self.class::UIDNotFoundException if (user.nil? || user.empty?)
user
Expand Down

0 comments on commit caf8e77

Please sign in to comment.