[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#3467) URL parsing routines non symmetric; generated URL strings unusable
According to RFC 2396's reserved chars,
ldap://localhost:389/dc=example,dc=org??sub?(objectClass=*)
should be rewritten as
ldap://localhost:389/dc%3Dexample%2Cdc%3Dorg??sub?(objectClass%3D*)
while a path "/var/lib/ldap/sock" should appear in a ldapi URI as
ldapi://%2Fvar%2Flib%2Fldap%2Fsock/
None of them are currently rewritten like that by the URI handling
routines. However, I think that while the latter is likely to
mandatorily be parsed correctly, the former is not advisable. In this
case a reasonable interpretation is that each portion of the LDAP URI
have its own set of "reserved" chars, i.e. those that must be escaped to
pervent erroneous interpretations. For instance, the <host> portion
should consider '/' as reserved, because it's the separator at the end
of the [<host>][:<port>] portion; the '?' should be reserved in the <dn>
and in the <filter> (it's meaningless in <attrs> and <scope>). Finally,
I note that the values in each of the <attrs>, if present, get the
commas ',' escaped. I think commas should not be treated specially,
since they cannot appear in attribute descriptions; I'd rather treat
them as errors.
The patch is at
<ftp://ftp.openldap.org/incoming/pierangelo.masarati.url.2005-01-10.patch>.
p.
SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497