You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Norval Hope (JIRA)" <ji...@apache.org> on 2007/03/16 07:01:09 UTC
[jira] Created: (DIRSERVER-873) Apparent problem in decoding LDAP
requests
Apparent problem in decoding LDAP requests
------------------------------------------
Key: DIRSERVER-873
URL: https://issues.apache.org/jira/browse/DIRSERVER-873
Project: Directory ApacheDS
Issue Type: Bug
Components: asn1, ldap
Affects Versions: 1.5.0
Environment: WindowsXP, JDK 1.5.06
Reporter: Norval Hope
I'm sending a request with a non-seven bit ascii char in a DN from JXplorer and it seems to be decoded incorrectly when it arrives at ApacheDS (ASN level byte logging is attached). I see the same problem when sending the request from JMeter too.
The DN I used was "uid=tté,ou=system" (same as uid= value in attributes) but decoded as 'uid=tt\C3\A9,ou=system' where I was expecting 'uid=tt\E9,ou=system'. The full data I sent was:
DN: uid=tté,ou=system
cn: tté
objectClass: inetOrgPerson
sn: ttsn
I tried sending the DN as 'uid=tt\E9,ou=system' but then JXplorer tried to quote the '\' itself so it seems that it wants to be responsible for the conversion to an rfc2253 compliant DN itself.
I know all this encoding/codepage/locale/lang stuff is always a big PITA and that this may be related to to the default encoding on WinXP or some such thing, but even then I'm struggling to see how one Latin char 'é' becomes two hex chars \C3 and \A9 in UTF8. At any rate I have attached the ASN byte logs so that someone more knowledgeable can review and state definitively that the bytes received by AD are already "bad". Note that I ran this test against the latest 1.5 trunks (after first noticing the issue in my own out-of-date a heavily modified version of 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DIRSERVER-873) Apparent problem in decoding LDAP
requests
Posted by "Norval Hope (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Norval Hope updated DIRSERVER-873:
----------------------------------
Attachment: Copy of apacheds-rolling.log
Log for decoding of the problematic ADD request.
> Apparent problem in decoding LDAP requests
> ------------------------------------------
>
> Key: DIRSERVER-873
> URL: https://issues.apache.org/jira/browse/DIRSERVER-873
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: asn1, ldap
> Affects Versions: 1.5.0
> Environment: WindowsXP, JDK 1.5.06
> Reporter: Norval Hope
> Attachments: Copy of apacheds-rolling.log
>
>
> I'm sending a request with a non-seven bit ascii char in a DN from JXplorer and it seems to be decoded incorrectly when it arrives at ApacheDS (ASN level byte logging is attached). I see the same problem when sending the request from JMeter too.
> The DN I used was "uid=tté,ou=system" (same as uid= value in attributes) but decoded as 'uid=tt\C3\A9,ou=system' where I was expecting 'uid=tt\E9,ou=system'. The full data I sent was:
> DN: uid=tté,ou=system
> cn: tté
> objectClass: inetOrgPerson
> sn: ttsn
> I tried sending the DN as 'uid=tt\E9,ou=system' but then JXplorer tried to quote the '\' itself so it seems that it wants to be responsible for the conversion to an rfc2253 compliant DN itself.
> I know all this encoding/codepage/locale/lang stuff is always a big PITA and that this may be related to to the default encoding on WinXP or some such thing, but even then I'm struggling to see how one Latin char 'é' becomes two hex chars \C3 and \A9 in UTF8. At any rate I have attached the ASN byte logs so that someone more knowledgeable can review and state definitively that the bytes received by AD are already "bad". Note that I ran this test against the latest 1.5 trunks (after first noticing the issue in my own out-of-date a heavily modified version of 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRSERVER-873) Apparent problem in decoding LDAP
requests
Posted by "Norval Hope (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481990 ]
Norval Hope commented on DIRSERVER-873:
---------------------------------------
Ok, I'm a little confused about how a character represented by 233 decimal ends up being encoded as six bytes but no need to explain is this is correct behaviour.
However, I found a table here http://www1.tip.nl/~t876506/utf8tbl.html which states that e-grave is 195.136 decimal or C388 hex in UTF-8, rather then C3A9. Double checked and found another page http://www.utf8-chartable.de/ that lists it as C3A9 after all, so presume the first page is in error.
So...I see this issue is bogus and I was wrong to expect to see 'E9' anywhere as this is the Unicode, rather then UTF8, encoding of 'é'. I will close the issue. Sorry for my confusion.
> Apparent problem in decoding LDAP requests
> ------------------------------------------
>
> Key: DIRSERVER-873
> URL: https://issues.apache.org/jira/browse/DIRSERVER-873
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: asn1, ldap
> Affects Versions: 1.5.0
> Environment: WindowsXP, JDK 1.5.06
> Reporter: Norval Hope
> Attachments: Copy of apacheds-rolling.log, Copy of apacheds-rolling.log
>
>
> I'm sending a request with a non-seven bit ascii char in a DN from JXplorer and it seems to be decoded incorrectly when it arrives at ApacheDS (ASN level byte logging is attached). I see the same problem when sending the request from JMeter too.
> The DN I used was "uid=tté,ou=system" (same as uid= value in attributes) but decoded as 'uid=tt\C3\A9,ou=system' where I was expecting 'uid=tt\E9,ou=system'. The full data I sent was:
> DN: uid=tté,ou=system
> cn: tté
> objectClass: inetOrgPerson
> sn: ttsn
> I tried sending the DN as 'uid=tt\E9,ou=system' but then JXplorer tried to quote the '\' itself so it seems that it wants to be responsible for the conversion to an rfc2253 compliant DN itself.
> I know all this encoding/codepage/locale/lang stuff is always a big PITA and that this may be related to to the default encoding on WinXP or some such thing, but even then I'm struggling to see how one Latin char 'é' becomes two hex chars \C3 and \A9 in UTF8. At any rate I have attached the ASN byte logs so that someone more knowledgeable can review and state definitively that the bytes received by AD are already "bad". Note that I ran this test against the latest 1.5 trunks (after first noticing the issue in my own out-of-date a heavily modified version of 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRSERVER-873) Apparent problem in decoding LDAP
requests
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481571 ]
Emmanuel Lecharny commented on DIRSERVER-873:
---------------------------------------------
The end of your log shows the entry :
Entry : 'uid=tt\C3\A9,ou=system'
this is plain normal, as we dump the DN in a normalized form.
I gonna check if we have a problem with this conversion using LdapStudio.
> Apparent problem in decoding LDAP requests
> ------------------------------------------
>
> Key: DIRSERVER-873
> URL: https://issues.apache.org/jira/browse/DIRSERVER-873
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: asn1, ldap
> Affects Versions: 1.5.0
> Environment: WindowsXP, JDK 1.5.06
> Reporter: Norval Hope
> Attachments: Copy of apacheds-rolling.log
>
>
> I'm sending a request with a non-seven bit ascii char in a DN from JXplorer and it seems to be decoded incorrectly when it arrives at ApacheDS (ASN level byte logging is attached). I see the same problem when sending the request from JMeter too.
> The DN I used was "uid=tté,ou=system" (same as uid= value in attributes) but decoded as 'uid=tt\C3\A9,ou=system' where I was expecting 'uid=tt\E9,ou=system'. The full data I sent was:
> DN: uid=tté,ou=system
> cn: tté
> objectClass: inetOrgPerson
> sn: ttsn
> I tried sending the DN as 'uid=tt\E9,ou=system' but then JXplorer tried to quote the '\' itself so it seems that it wants to be responsible for the conversion to an rfc2253 compliant DN itself.
> I know all this encoding/codepage/locale/lang stuff is always a big PITA and that this may be related to to the default encoding on WinXP or some such thing, but even then I'm struggling to see how one Latin char 'é' becomes two hex chars \C3 and \A9 in UTF8. At any rate I have attached the ASN byte logs so that someone more knowledgeable can review and state definitively that the bytes received by AD are already "bad". Note that I ran this test against the latest 1.5 trunks (after first noticing the issue in my own out-of-date a heavily modified version of 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DIRSERVER-873) Apparent problem in decoding LDAP
requests
Posted by "Norval Hope (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Norval Hope closed DIRSERVER-873.
---------------------------------
Resolution: Invalid
Was incorrectly expecting to see Unicode encoding for 'é' (E9) whereas UTF-8 encoding was present C3A9.
> Apparent problem in decoding LDAP requests
> ------------------------------------------
>
> Key: DIRSERVER-873
> URL: https://issues.apache.org/jira/browse/DIRSERVER-873
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: asn1, ldap
> Affects Versions: 1.5.0
> Environment: WindowsXP, JDK 1.5.06
> Reporter: Norval Hope
> Attachments: Copy of apacheds-rolling.log, Copy of apacheds-rolling.log
>
>
> I'm sending a request with a non-seven bit ascii char in a DN from JXplorer and it seems to be decoded incorrectly when it arrives at ApacheDS (ASN level byte logging is attached). I see the same problem when sending the request from JMeter too.
> The DN I used was "uid=tté,ou=system" (same as uid= value in attributes) but decoded as 'uid=tt\C3\A9,ou=system' where I was expecting 'uid=tt\E9,ou=system'. The full data I sent was:
> DN: uid=tté,ou=system
> cn: tté
> objectClass: inetOrgPerson
> sn: ttsn
> I tried sending the DN as 'uid=tt\E9,ou=system' but then JXplorer tried to quote the '\' itself so it seems that it wants to be responsible for the conversion to an rfc2253 compliant DN itself.
> I know all this encoding/codepage/locale/lang stuff is always a big PITA and that this may be related to to the default encoding on WinXP or some such thing, but even then I'm struggling to see how one Latin char 'é' becomes two hex chars \C3 and \A9 in UTF8. At any rate I have attached the ASN byte logs so that someone more knowledgeable can review and state definitively that the bytes received by AD are already "bad". Note that I ran this test against the latest 1.5 trunks (after first noticing the issue in my own out-of-date a heavily modified version of 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRSERVER-873) Apparent problem in decoding LDAP
requests
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481568 ]
Emmanuel Lecharny commented on DIRSERVER-873:
---------------------------------------------
Hmmmm.... This log is not exactly what I need to understand what happens. I would like to have the full PDU, which is dumped by the TwixDecoder class.
Is it possible to have it ?
> Apparent problem in decoding LDAP requests
> ------------------------------------------
>
> Key: DIRSERVER-873
> URL: https://issues.apache.org/jira/browse/DIRSERVER-873
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: asn1, ldap
> Affects Versions: 1.5.0
> Environment: WindowsXP, JDK 1.5.06
> Reporter: Norval Hope
> Attachments: Copy of apacheds-rolling.log
>
>
> I'm sending a request with a non-seven bit ascii char in a DN from JXplorer and it seems to be decoded incorrectly when it arrives at ApacheDS (ASN level byte logging is attached). I see the same problem when sending the request from JMeter too.
> The DN I used was "uid=tté,ou=system" (same as uid= value in attributes) but decoded as 'uid=tt\C3\A9,ou=system' where I was expecting 'uid=tt\E9,ou=system'. The full data I sent was:
> DN: uid=tté,ou=system
> cn: tté
> objectClass: inetOrgPerson
> sn: ttsn
> I tried sending the DN as 'uid=tt\E9,ou=system' but then JXplorer tried to quote the '\' itself so it seems that it wants to be responsible for the conversion to an rfc2253 compliant DN itself.
> I know all this encoding/codepage/locale/lang stuff is always a big PITA and that this may be related to to the default encoding on WinXP or some such thing, but even then I'm struggling to see how one Latin char 'é' becomes two hex chars \C3 and \A9 in UTF8. At any rate I have attached the ASN byte logs so that someone more knowledgeable can review and state definitively that the bytes received by AD are already "bad". Note that I ran this test against the latest 1.5 trunks (after first noticing the issue in my own out-of-date a heavily modified version of 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DIRSERVER-873) Apparent problem in decoding LDAP
requests
Posted by "Norval Hope (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Norval Hope updated DIRSERVER-873:
----------------------------------
Attachment: Copy of apacheds-rolling.log
Not sure if this Twix log is of any interest after your earlier investigation, but attaching it just in case.
> Apparent problem in decoding LDAP requests
> ------------------------------------------
>
> Key: DIRSERVER-873
> URL: https://issues.apache.org/jira/browse/DIRSERVER-873
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: asn1, ldap
> Affects Versions: 1.5.0
> Environment: WindowsXP, JDK 1.5.06
> Reporter: Norval Hope
> Attachments: Copy of apacheds-rolling.log, Copy of apacheds-rolling.log
>
>
> I'm sending a request with a non-seven bit ascii char in a DN from JXplorer and it seems to be decoded incorrectly when it arrives at ApacheDS (ASN level byte logging is attached). I see the same problem when sending the request from JMeter too.
> The DN I used was "uid=tté,ou=system" (same as uid= value in attributes) but decoded as 'uid=tt\C3\A9,ou=system' where I was expecting 'uid=tt\E9,ou=system'. The full data I sent was:
> DN: uid=tté,ou=system
> cn: tté
> objectClass: inetOrgPerson
> sn: ttsn
> I tried sending the DN as 'uid=tt\E9,ou=system' but then JXplorer tried to quote the '\' itself so it seems that it wants to be responsible for the conversion to an rfc2253 compliant DN itself.
> I know all this encoding/codepage/locale/lang stuff is always a big PITA and that this may be related to to the default encoding on WinXP or some such thing, but even then I'm struggling to see how one Latin char 'é' becomes two hex chars \C3 and \A9 in UTF8. At any rate I have attached the ASN byte logs so that someone more knowledgeable can review and state definitively that the bytes received by AD are already "bad". Note that I ran this test against the latest 1.5 trunks (after first noticing the issue in my own out-of-date a heavily modified version of 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DIRSERVER-873) Apparent problem in decoding LDAP
requests
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSERVER-873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481614 ]
Emmanuel Lecharny commented on DIRSERVER-873:
---------------------------------------------
Ok, I went through some more investigation, and here is what I get :
- DN are stored in two form inside the server : bytes and user provided form (Unicode). The bytes are always 7 bits, so the 'é' is stored as six bytes : 0x5C, 0x43, 0x33, 0x5C, 0x41, 0x39 ("\C3\A9")
- when we return a response (SearchResultEntry), those six bytes are translated to two bytes : 0xC3 0xA9, which are the UTF-8 bytes for 'é'.
So basically, I would say that the server behavior is correct. I have tested it on my mac osx, with LdapStudio, and the only bias I can see is that my mac is using french code (ISO 8859-1).
more to come.
> Apparent problem in decoding LDAP requests
> ------------------------------------------
>
> Key: DIRSERVER-873
> URL: https://issues.apache.org/jira/browse/DIRSERVER-873
> Project: Directory ApacheDS
> Issue Type: Bug
> Components: asn1, ldap
> Affects Versions: 1.5.0
> Environment: WindowsXP, JDK 1.5.06
> Reporter: Norval Hope
> Attachments: Copy of apacheds-rolling.log
>
>
> I'm sending a request with a non-seven bit ascii char in a DN from JXplorer and it seems to be decoded incorrectly when it arrives at ApacheDS (ASN level byte logging is attached). I see the same problem when sending the request from JMeter too.
> The DN I used was "uid=tté,ou=system" (same as uid= value in attributes) but decoded as 'uid=tt\C3\A9,ou=system' where I was expecting 'uid=tt\E9,ou=system'. The full data I sent was:
> DN: uid=tté,ou=system
> cn: tté
> objectClass: inetOrgPerson
> sn: ttsn
> I tried sending the DN as 'uid=tt\E9,ou=system' but then JXplorer tried to quote the '\' itself so it seems that it wants to be responsible for the conversion to an rfc2253 compliant DN itself.
> I know all this encoding/codepage/locale/lang stuff is always a big PITA and that this may be related to to the default encoding on WinXP or some such thing, but even then I'm struggling to see how one Latin char 'é' becomes two hex chars \C3 and \A9 in UTF8. At any rate I have attached the ASN byte logs so that someone more knowledgeable can review and state definitively that the bytes received by AD are already "bad". Note that I ran this test against the latest 1.5 trunks (after first noticing the issue in my own out-of-date a heavily modified version of 1.5)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.