LDAP server - add handling for root DSE queries (needed for Radicale 3.5.2+)
This commit is contained in:
@@ -88,8 +88,15 @@ class LDAPRoutingUnit extends CanonicalUnit {
|
||||
route_functions.push(route_handler)
|
||||
}
|
||||
|
||||
this.output.debug(`Registering route ${type} :: ${[route_prefix, suffix].join(',')} with ${route_functions.length} handlers.`)
|
||||
this.ldap_server.server[type]([route_prefix, suffix].join(','), ...route_functions)
|
||||
// Routers marked `absolute` opt out of the base DC suffix. The Root
|
||||
// DSE needs this: its DN is the zero-length string, which sits
|
||||
// outside every naming context by definition. (RFC 4512 §5.1)
|
||||
const route_dn = instance.absolute === true
|
||||
? route_prefix
|
||||
: [route_prefix, suffix].join(',')
|
||||
|
||||
this.output.debug(`Registering route ${type} :: ${route_dn} with ${route_functions.length} handlers.`)
|
||||
this.ldap_server.server[type](route_dn, ...route_functions)
|
||||
}
|
||||
} else {
|
||||
// Unbind has a default handler, so don't warn about that.
|
||||
|
||||
Reference in New Issue
Block a user