Subject: | is subroutine _unescape correct? |
Module Net::LDAP::Filter
I got some problems with a filter like this
(uniquemember=uid=1234+456,c=de,ou=test,o=company.com)
I get an invalid DN syntax exception from the server.
While looking into to it, I found some difference between the
documentation of _unescape and the regex itself:
Documentation:
# Unescape
# \xx where xx is a 2-digit hex number
# \y where y is one of ( ) \ *
regex:
sub _unescape {
$_[0] =~ s/
\\([\da-fA-F]{2}|.)
/....
well this regex matches any string with a \ and another character and
not only ( ) \ * for the next character
\\([\da-fA-F]{2}|[()\\*])
seems to be more like the documentation. And this change fixed my problem.