Szerző: michael Dátum: Címzett: exim-users Tárgy: [Exim] Bug in quote_ldap?
Hello,
while debugging something, I observed a serious bug in quote_ldap.
It should possibly be called quote_url, because it appears only to quote
URL characters. For example,
cn=${quote_ldap: two}
expands to:
cn=%20two
That is fine looking at URL syntax, but a leading space is not part
of the name (see RFC 1485). Instead, it should expand to:
cn=#2074776f
The string representation of DNs does not allow to quote characters,
only the full string can be given in hex.
But now the URL encoding is broken, and since one quote_ldap function
could never know if it currently processes part of a DN or not, I
suggest two new functions: quote_dnstring (performing RFC1485 quoting for
<optional-space> <string> of the <attribute> production) and quote_url.
Perhaps we need more later, but these two would suffice for me. ;-)
Perhaps I still overlook something or there is a better way. Comments are
appreciated.