Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
86d3b2b8
Commit
86d3b2b8
authored
Dec 09, 2018
by
IKEDA Soji
Browse files
[bug] On ldap_authantication(), autentication ID was not escaped.
parent
70b14fd3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/WWW/Auth.pm
View file @
86d3b2b8
...
...
@@ -30,6 +30,7 @@ package Sympa::WWW::Auth;
use
strict
;
use
warnings
;
use
Digest::
MD5
;
BEGIN
{
eval
'
use Net::LDAP::Util
';
}
use
Sympa
;
use
Conf
;
...
...
@@ -203,6 +204,10 @@ sub ldap_authentication {
my
$whichfilter
=
shift
;
die
'
bug in logic. Ask developer
'
unless
$ldap
->
{
auth_type
}
eq
'
ldap
';
unless
(
$
Net::LDAP::Util::
VERSION
)
{
$log
->
syslog
('
err
',
'
Net::LDAP::Util required. Install it
');
return
undef
;
}
# Skip ldap auth mechanism if an email address was provided and it does
# not match the corresponding regexp.
...
...
@@ -219,7 +224,8 @@ sub ldap_authentication {
}
elsif
(
$whichfilter
eq
'
email_filter
')
{
$filter
=
$ldap
->
{'
get_dn_by_email_filter
'};
}
$filter
=~
s/\[sender\]/$auth/ig
;
#FIXME: escape.
my
$escaped_auth
=
Net::LDAP::Util::
escape_filter_value
(
$auth
);
$filter
=~
s/\[sender\]/$escaped_auth/ig
;
# Get the user's entry.
my
$db
=
Sympa::
Database
->
new
('
LDAP
',
%$ldap
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment