]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 785470: (CVE-2012-3981) [SECURITY] Missing escaping of the username can lead...
authorReed Loden <reed@reedloden.com>
Thu, 30 Aug 2012 18:28:58 +0000 (20:28 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 30 Aug 2012 18:28:58 +0000 (20:28 +0200)
r/a=LpSolit

Bugzilla/Auth/Verify/LDAP.pm

index cdc802ca05526c85651ca234ac3c2e59d2d44c9c..0f10f9fbfe9153305fa3d5eecb191644bbd73bb6 100644 (file)
@@ -41,6 +41,7 @@ use Bugzilla::User;
 use Bugzilla::Util;
 
 use Net::LDAP;
+use Net::LDAP::Util qw(escape_filter_value);
 
 use constant admin_can_create_account => 0;
 use constant user_can_create_account  => 0;
@@ -144,6 +145,7 @@ sub check_credentials {
 
 sub _bz_search_params {
     my ($username) = @_;
+    $username = escape_filter_value($username);
     return (base   => Bugzilla->params->{"LDAPBaseDN"},
             scope  => "sub",
             filter => '(&(' . Bugzilla->params->{"LDAPuidattribute"}