From aa57f25e629ad052b33d66635e5430d34f4c5f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Mon, 17 Apr 2017 19:20:25 +0200 Subject: Correctly decode LDAP data (mga#20686) --- Bugzilla/Auth/Verify/LDAP.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/Verify/LDAP.pm index e37f55793..9687363d6 100644 --- a/Bugzilla/Auth/Verify/LDAP.pm +++ b/Bugzilla/Auth/Verify/LDAP.pm @@ -163,7 +163,8 @@ sub ldap { ThrowCodeError("ldap_server_not_defined") unless @servers; foreach (@servers) { - $self->{ldap} = new Net::LDAP(trim($_)); + # The 'raw' attribute is used to make sure that data is correctly decoded. + $self->{ldap} = new Net::LDAP(trim($_), raw => ';binary'); last if $self->{ldap}; } ThrowCodeError("ldap_connect_failed", { server => join(", ", @servers) }) -- cgit v1.2.1