Permalink
Browse files

Another bugfix

git-svn-id: https://svn.thoughtbot.com/ldap-activerecord-gateway@15 bbed3248-5b21-0410-9248-c913b1c69bca
  • Loading branch information...
tsaleh
tsaleh committed Nov 29, 2006
1 parent 879ff4c commit aa5e17c831283941a951ab7214d55a89fd8fdbcc
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/active-record-operation.rb
@@ -69,7 +69,7 @@ def parse_filter(filter)
query = filter[2]
- if query.length != 6
+ if !(query.length > 3)
@logger.info "Denying complex query (error 2): #{filter.inspect}"
raise LDAP::ResultError::UnwillingToPerform, "This query is way too complex: #{filter.inspect}"
end
@@ -79,7 +79,7 @@ def parse_filter(filter)
raise LDAP::ResultError::UnwillingToPerform, "This query is way too complex: #{filter.inspect}"
end
- query_string = query[2..5].compact.first # We're just going to take the first non-nil element as the search string
+ query_string = query[2..-1].compact.first # We're just going to take the first non-nil element as the search string
if !query_string
@logger.info "Refusing to respond to blank query string: #{filter.inspect}."

0 comments on commit aa5e17c

Please sign in to comment.