google-code-export / ruby-activeldap

Automatically exported from code.google.com/p/ruby-activeldap
Other
1 stars 1 forks source link

Cannot search with spaces #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. User.all("bob*") works fine.
2. User.first("Bob Smith") causes error

What is the expected output? What do you see instead?
 - I expect to see a result returned with the correct CN

bruce@xxx:~$ ./script/console 
Loading development environment (Rails 2.3.5)
>> User.all("Bob Smith")
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:302:in
`initialize': invalid filter syntax (Net::LDAP::LdapError)
    from
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:283:in
`new'
    from
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap/filter.rb:283:in
`construct'
    from
/usr/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:1128:in
`search'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/net_ldap.rb
:141:in
`send'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/net_ldap.rb
:141:in
`execute'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:659
:in
`log'
    from
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benc
hmark.rb:10:in
`realtime'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:659
:in
`log'
     ... 13 levels...
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:250:i
n
`all'
    from (irb):1:in `irb_binding'
    from /usr/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
    from /usr/lib/ruby/1.8/irb/workspace.rb:52

What version of the product are you using? On what operating system?
 - activeldap 1.2.1 on Ubuntu 8.04.2 LTS

Original issue reported on code.google.com by bruce.mc...@gmail.com on 7 Jan 2010 at 5:27

GoogleCodeExporter commented 9 years ago
Please retry it with net-ldap gem not ruby-net-ldap gem.
It may be solved...

Original comment by kou...@gmail.com on 7 Jan 2010 at 5:34

GoogleCodeExporter commented 9 years ago
Using net-ldap, I get the following error:

ActiveLdap::ConnectionError: Giving up trying to reconnect to LDAP server.
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:597
:in
`reconnect'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:574
:in
`loop'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:574
:in
`reconnect'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:611
:in
`reconnect_if_need'
    from /usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/timeout.rb:15:in
`call'
    from /usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/timeout.rb:15:in
`alarm'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:321
:in
`with_timeout'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:610
:in
`reconnect_if_need'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:272
:in
`operation'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/base.rb:169
:in
`search'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/adapter/net_ldap.rb
:66:in `search'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:65:in
 `search'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:282:i
n
`find_every'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:255:i
n
`find_initial'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:220:i
n `find'
    from
/usr/lib/ruby/gems/1.8/gems/activeldap-1.2.1/lib/active_ldap/operations.rb:236:i
n `first'

Original comment by bruce.mc...@gmail.com on 8 Jan 2010 at 7:14

GoogleCodeExporter commented 9 years ago
Is your connection information correct?
Can you connect to your LDAP server with the connection information by other 
LDAP
tool? (e.g. ldapsearch)

Original comment by kou...@gmail.com on 6 Mar 2010 at 7:27

GoogleCodeExporter commented 9 years ago

Original comment by kou...@gmail.com on 25 Apr 2010 at 10:41

GoogleCodeExporter commented 9 years ago
Did you find the bug? I'm having the same issue on Ubuntu 10.04. 
All was working well, but now I have this error too

Original comment by cedric.f...@gmail.com on 10 Nov 2010 at 2:16

GoogleCodeExporter commented 9 years ago
It seems that this issue is duplicated issue of #55.
Is it right?

Original comment by kou...@gmail.com on 19 Nov 2010 at 12:48