LDAP server - add handling for root DSE queries (needed for Radicale 3.5.2+)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/deployment/woodpecker Pipeline was successful

This commit is contained in:
2026-09-22 22:39:18 -05:00
parent 4398d8dfb3
commit e1d7a809f9
3 changed files with 160 additions and 2 deletions

View File

@@ -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.