Fixed issue #1114 - Configuration of LDAP with disabled anonymous bind fails.

This commit is contained in:
Thorsten Eckel 2017-05-31 13:36:25 +02:00
parent 118ed9d58b
commit 017022eae9
2 changed files with 21 additions and 11 deletions

View file

@ -287,12 +287,13 @@ class ConnectionWizard extends App.WizardModal
option = ''
options = {}
for dn in data.attributes.namingcontexts
options[dn] = dn
if option is ''
option = dn
if option.length > dn.length
option = dn
if !_.isEmpty data.attributes
for dn in data.attributes.namingcontexts
options[dn] = dn
if option is ''
option = dn
if option.length > dn.length
option = dn
@wizardConfig.options = options
@wizardConfig.option = option

View file

@ -14,12 +14,21 @@ class Integration::LdapController < ApplicationController
attributes: ldap.preferences,
}
rescue => e
logger.error e
# workaround for issue #1114
if e.message.end_with?(', 48, Inappropriate Authentication')
result = {
result: 'ok',
attributes: {},
}
else
logger.error e
result = {
result: 'failed',
message: e.message,
}
end
render json: {
result: 'failed',
message: e.message,
}
render json: result
end
def bind