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
c423290c
Commit
c423290c
authored
Mar 08, 2007
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 367480: [LDAP] Try a list of servers in order until we connect successfully
Patch By Tony Bajan <firefox@tonyb.me.uk> r=mkanat, a=mkanat
parent
558b05ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
LDAP.pm
Bugzilla/Auth/Verify/LDAP.pm
+9
-4
ldap.html.tmpl
template/en/default/admin/params/ldap.html.tmpl
+3
-1
code-error.html.tmpl
template/en/default/global/code-error.html.tmpl
+1
-1
No files found.
Bugzilla/Auth/Verify/LDAP.pm
View file @
c423290c
...
...
@@ -37,6 +37,7 @@ use fields qw(
use
Bugzilla::
Constants
;
use
Bugzilla::
Error
;
use
Bugzilla::
Util
;
use
Net::
LDAP
;
...
...
@@ -134,11 +135,15 @@ sub ldap {
my
(
$self
)
=
@_
;
return
$self
->
{
ldap
}
if
$self
->
{
ldap
};
my
$server
=
Bugzilla
->
params
->
{
"LDAPserver"
}
;
ThrowCodeError
(
"ldap_server_not_defined"
)
unless
$server
;
my
@servers
=
split
(
/[\s,]+]/
,
Bugzilla
->
params
->
{
"LDAPserver"
})
;
ThrowCodeError
(
"ldap_server_not_defined"
)
unless
@servers
;
$self
->
{
ldap
}
=
new
Net::
LDAP
(
$server
)
||
ThrowCodeError
(
"ldap_connect_failed"
,
{
server
=>
$server
});
foreach
(
@servers
)
{
$self
->
{
ldap
}
=
new
Net::
LDAP
(
trim
(
$_
));
last
if
$self
->
{
ldap
};
}
ThrowCodeError
(
"ldap_connect_failed"
,
{
server
=>
join
(
", "
,
@servers
)
})
unless
$self
->
{
ldap
};
# try to start TLS if needed
if
(
Bugzilla
->
params
->
{
"LDAPstarttls"
})
{
...
...
template/en/default/admin/params/ldap.html.tmpl
View file @
c423290c
...
...
@@ -30,7 +30,9 @@
"URI syntax can also be used, such as "_
"ldaps://ldap.company.com (for a secure connection) or " _
"ldapi://%2fvar%2flib%2fldap_sock (for a socket-based " _
"local connection.",
"local connection. Multiple hostnames or URIs can be comma " _
"separated; each will be tried in turn until a connection is " _
"established.",
LDAPstartls => "Whether to require encrypted communication once normal " _
"LDAP connection achieved with the server.",
...
...
template/en/default/global/code-error.html.tmpl
View file @
c423290c
...
...
@@ -279,7 +279,7 @@
The specified LDAP attribute [% attr FILTER html %] was not found.
[% ELSIF error == "ldap_connect_failed" %]
Could not connect to the LDAP server <code>[% server FILTER html %]</code>.
Could not connect to the LDAP server
(s)
<code>[% server FILTER html %]</code>.
[% ELSIF error == "ldap_start_tls_failed" %]
Could not start TLS with LDAP server: <code>[% error FILTER html %]</code>.
...
...
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