You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Sorin Sbarnea (JIRA)" <ji...@apache.org> on 2015/12/09 12:07:10 UTC

[jira] [Comment Edited] (DIRSTUDIO-1078) unable to use # pound hash sign in LDAP filters

    [ https://issues.apache.org/jira/browse/DIRSTUDIO-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15048497#comment-15048497 ] 

Sorin Sbarnea edited comment on DIRSTUDIO-1078 at 12/9/15 11:06 AM:
--------------------------------------------------------------------

I still that there are some confusions here due to the specification not being really clear (what a surprise!)

Here is a copy/paste from the specification: CN=Before\0dAfter,DC=example,DC=net -- and as you can see there is no escape of the escape.

The # is one of the characters that *may* be escaped, which means that it is perfectly normal not to be escaped. Currently the code does not allow this.

Based on the RFC, it seems that the # may be prefixed by the backslash.

So reading the documentation I conclude that all these variants should be accepted and should work identically:
{code}
#some
\#some
\23some
{code}


was (Author: sbarnea):
I still that there are some confusions here due to the specification not being really clear (what a surprise!)

Here is a copy/paste from the specification: CN=Before\0dAfter,DC=example,DC=net -- and as you can see there is no escape of the escape.

The # is one of the characters that *may* be escaped, which means that it is perfectly normal not to be escaped. Currently the code does not allow this.

Based on the RFC, it seems that the # may be prefixed by the backslash.

So reading the documentation I conclude that all these variants should be accepted and should work identically:

#some
\#some
\23some


> unable to use # pound hash sign in LDAP filters
> -----------------------------------------------
>
>                 Key: DIRSTUDIO-1078
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-1078
>             Project: Directory Studio
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M9 (2.0.0.v20150606-M9)
>            Reporter: Sorin Sbarnea
>
> It seems impossible to perform searches that to use # sign inside. Tried to add them, not escaped, escaped with single or double backslash but none of these approaches worked. 
> Example
> {code}
> (&(objectClass=group)(displayName=*)(|(memberOf:1.2.840.113556.1.4.1941:=CN=\\#SOME,OU=Groups,OU=EMEA,DC=example,DC=net)))
> (&(objectClass=group)(displayName=*)(|(memberOf:1.2.840.113556.1.4.1941:=CN=\#SOME,OU=Groups,OU=EMEA,DC=example,DC=net)))
> (&(objectClass=group)(displayName=*)(|(memberOf:1.2.840.113556.1.4.1941:=CN=#SOME,OU=Groups,OU=EMEA,DC=example,DC=net)))
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)