directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norval Hope (JIRA)" <>
Subject [jira] Updated: (DIRSERVER-1247) removing unrequired escaping in DNs / filters
Date Thu, 11 Sep 2008 04:34:44 GMT


Norval Hope updated DIRSERVER-1247:

    Attachment: escaping.patch

This is the complete set of patches, now including changes to filter handling too. I'm sure
it would benefit from someone familiar with the 1.5.4 code casting their eye over it. In particular
the implementation of SimpleNode.getValueEscaped() and whether the escaped value should be
cached, or somehow handled better within the Value<T> implementation.

The basic motivation behind this patch is:
  1. UTF-8 encoded values in DNs / filters shouldn't stored as escaped just because they aren't
seven bit ascii. Escaped syntax should always be accepted as an alternative on the way in,
but not introduced by the codec unneccessarily as occurs at the moment.
  2. escaping required for a filter expression should disappear when looking at values on
individual nodes, and be added back again when you need to get the filter expression back
again using node.toString(). This is captured is a number of unit tests i've added.

> removing unrequired escaping in DNs / filters
> ---------------------------------------------
>                 Key: DIRSERVER-1247
>                 URL:
>             Project: Directory ApacheDS
>          Issue Type: Improvement
>          Components: ldap
>    Affects Versions: 1.5.4
>            Reporter: Norval Hope
>         Attachments: escaping.patch
>   Original Estimate: 8h
>  Remaining Estimate: 8h
> The current Dn and filter handling is overly restrictive in that all non-ascii characters
are quoted using the \NN syntax. This is probably due to rfc 2253 being unclear about the
fact that multibyte UTF-8 encoded values can be used, but this iss further clarified in rfc
4514 which superceeds 2253. The application of unrequired quoting makes debugging / reading
logs much harder then it should be, as it requires manual calculations rather then just setting
the file encoding on your log file / IDE windows to being UTF-8.
> I have attached a patch file with the required updates to code and unit tests under /shared/ldap
(some problems i had noted with earlier AD version due to unspecified encoding when converting
bytes to / from Strings had already been tidied up in AD 1.5.4). 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message