X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAuthentication%2FStore%2FLDAP%2FBackend.pm;h=8e69c59dc1f74fc118ebdab1a81a076f8d0f2ebf;hb=18d41a8f2fa6fcc3957535176d9cbc4715bd3f84;hp=8c457b785e481e24c55bd1aafcd264adc6524df3;hpb=e385da713da3f03f39bc2a43121ca9334e39155c;p=catagits%2FCatalyst-Authentication-Store-LDAP.git diff --git a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm index 8c457b7..8e69c59 100644 --- a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm +++ b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm @@ -282,11 +282,6 @@ This method is usually only called by find_user(). sub lookup_user { my ( $self, $id ) = @_; - # No sneaking in wildcards! - if ( $id =~ /\*/ ) { - Catalyst::Exception->throw("ID $id contains wildcards!"); - } - # Trim trailing space or we confuse ourselves $id =~ s/\s+$//; my $ldap = $self->ldap_bind; @@ -419,6 +414,7 @@ sub _replace_filter { my $self = shift; my $filter = shift; my $replace = shift; + $replace =~ s/([*()\\\x{0}])/sprintf '\\%02x', ord($1)/ge; $filter =~ s/\%s/$replace/g; return $filter; }