Commit 83fc5743 authored by Reed Loden's avatar Reed Loden Committed by Frédéric Buclin

Bug 785470: (CVE-2012-3981) [SECURITY] Missing escaping of the username can lead to LDAP injection

r/a=LpSolit
parent 1ff417cb
......@@ -18,6 +18,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;
......@@ -121,6 +122,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"}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment