Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
92d1e8e2
Commit
92d1e8e2
authored
Mar 04, 2006
by
jocuri%softhome.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch for bug 216902: support LDAPS connections; patch by Christian Krause…
Patch for bug 216902: support LDAPS connections; patch by Christian Krause <chkr@plauener.de>, r=vladd, a=justdave.
parent
6c3686bb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
LDAP.pm
Bugzilla/Auth/Verify/LDAP.pm
+22
-3
ldap.html.tmpl
template/en/default/admin/params/ldap.html.tmpl
+2
-1
No files found.
Bugzilla/Auth/Verify/LDAP.pm
View file @
92d1e8e2
...
@@ -73,10 +73,29 @@ sub authenticate {
...
@@ -73,10 +73,29 @@ sub authenticate {
}
}
my
$LDAPport
=
"389"
;
# default LDAP port
my
$LDAPport
=
"389"
;
# default LDAP port
if
(
$LDAPserver
=~
/:/
)
{
my
$LDAPprotocol
=
"ldap"
;
(
$LDAPserver
,
$LDAPport
)
=
split
(
":"
,
$LDAPserver
);
if
(
$LDAPserver
=~
/(ldap|ldaps):\/\/(.*)/
)
{
# ldap(s)://server(:port)
$LDAPprotocol
=
$1
;
my
$serverpart
=
$2
;
if
(
$serverpart
=~
/:/
)
{
# ldap(s)://server:port
(
$LDAPserver
,
$LDAPport
)
=
split
(
":"
,
$serverpart
);
}
else
{
# ldap(s)://server
$LDAPserver
=
$serverpart
;
if
(
$LDAPprotocol
eq
"ldaps"
)
{
$LDAPport
=
"636"
;
}
}
my
$LDAPconn
=
Net::
LDAP
->
new
(
$LDAPserver
,
port
=>
$LDAPport
,
version
=>
3
);
}
}
elsif
(
$LDAPserver
=~
/:/
)
{
# server:port
(
$LDAPserver
,
$LDAPport
)
=
split
(
":"
,
$LDAPserver
);
}
my
$LDAPconn
=
Net::
LDAP
->
new
(
"$LDAPprotocol://$LDAPserver:$LDAPport"
,
version
=>
3
);
if
(
!
$LDAPconn
)
{
if
(
!
$LDAPconn
)
{
return
(
AUTH_ERROR
,
undef
,
"connect_failed"
);
return
(
AUTH_ERROR
,
undef
,
"connect_failed"
);
}
}
...
...
template/en/default/admin/params/ldap.html.tmpl
View file @
92d1e8e2
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
[% param_descs = {
[% param_descs = {
LDAPserver => "The name (and optionally port) of your LDAP server " _
LDAPserver => "The name (and optionally port) of your LDAP server " _
"(e.g. ldap.company.com, or ldap.company.com:portnum).",
"(e.g. ldap.company.com, or ldap.company.com:portnum). " _
"Can be prefixed with ldap:// (default) or ldaps:// (for a secure connection).",
LDAPbinddn => "If your LDAP server requires that you use a binddn and password " _
LDAPbinddn => "If your LDAP server requires that you use a binddn and password " _
"instead of binding anonymously, enter it here " _
"instead of binding anonymously, enter it here " _
...
...
Write
Preview
Markdown
is supported
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