Complex filter not recognized properly
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > Complex filter not recognized properly




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Complex filter not recognized properly  
Vladimir Gjokevski


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-16-06 06:11 PM

Hi,
I have created a custom partition that is responsible for serving PGP
keys, and i have the following
problem:

when issuing with ldapsearch the following command:

ldapsearch -x -H ldap://localhost:11500 -D "dn=bugs" -w bunny -b
"dc=pgpkeys" "(&(pgpuserid=test*)(pgpdisabled=0))"

in the search() method of my custom partition class I get a SimpleNode
filter with just (pgpdisabled=0) instead
of more complex filter i guess it should be a BranchNode object that
will represent the filter "(&(pgpuserid=test*)(pgpdisabled=0))"
sent by the client.

Here is the log:
-----------------------------------------------------
2391938 [IoThreadPool-2] INFO
org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler

- [/127.0.0.1:1779] RECEIVED:
org.apache.directory.shared.ldap.message.UnbindRequestImpl@13ada
2391938 [IoThreadPool-2] INFO
org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler

- [/127.0.0.1:1779] CLOSE
2391938 [IoThreadPool-2] INFO
org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler

- [/127.0.0.1:1779] CLOSED
2475391 [IoThreadPool-1] INFO
org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler

- [/127.0.0.1:1783] OPENED
2475422 [IoThreadPool-2] INFO
org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler

- [/127.0.0.1:1783] RECEIVED:     BindRequest
Version : '3'
Name : 'dn=bugs'
Simple authentication : 'bunny/0x62 0x75 0x6E 0x6E 0x79 '

2475422 [IoThreadPool-2] INFO
org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler

- [/127.0.0.1:1783] WRITE:     BindResponse
Ldap Result
Result code : (ResultCodeEnum[SUCCESS=0]) success
Matched DN : 'null'
Error message : 'null'

2475422 [IoThreadPool-2] INFO
org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler

- [/127.0.0.1:1783] SENT:     BindResponse
Ldap Result
Result code : (ResultCodeEnum[SUCCESS=0]) success
Matched DN : 'null'
Error message : 'null'

2475422 [IoThreadPool-1] INFO
org.apache.directory.server.ldap. LdapProtocolProvider$LdapProtocolHandler

- [/127.0.0.1:1783] RECEIVED:     SearchRequest
baseDn : 'dc=pgpkeys'
filter : '(pgpdisabled=0) '
scope : whole subtree
typesOnly : false
no limit
Time Limit : no limit
Deref Aliases : never Deref Aliases
attributes :
-----------------------------------------------------

Regards,
Vladimir Gjokjevski






[ Post a follow-up to this message ]



    Re: Complex filter not recognized properly  
Alex Karasulu


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-17-06 06:11 AM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vladimir Gjokevski wrote:
> Hi,
> I have created a custom partition that is responsible for serving PGP
> keys, and i have the following
> problem:
>
> when issuing with ldapsearch the following command:
>
> ldapsearch -x -H ldap://localhost:11500 -D "dn=bugs" -w bunny -b
> "dc=pgpkeys" "(&(pgpuserid=test*)(pgpdisabled=0))"
>
> in the search() method of my custom partition class I get a SimpleNode
> filter with just (pgpdisabled=0) instead
> of more complex filter i guess it should be a BranchNode object that
> will represent the filter "(&(pgpuserid=test*)(pgpdisabled=0))"
> sent by the client.

Hi Vladimir,

Yes this is the expected result if you have not defined pgpuserid as a
valid schema attribute.  Basically the server ignores terms (actively
trimming them from the filter's AST) if they are not defined attributes.

LDAP specifies that undefined attribute value assertions in filters are
to be ignored hence the pruning.

To work around this make sure you add pgpuserid in a custom schema to
apacheds.  If you've already done this, make sure you have spelled the
attribute identifier correctly.

HTH,
Alex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

 iD8DBQFEk5GHPVto+tI7JJARAnM6AKD7Yjffr5CK
lRgLy+iA4rlDPwT/nQCfRty2
+vSXSnFwOriuA/mAAqyl6QU=
=ld9Q
-----END PGP SIGNATURE-----






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:04 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register