%u replaced only once in LDAP query string
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Jabberd |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
In c2s.xml, it is possible to give a query string that retrieves a user's DN, given the user name %u and the realm %r. In my place, I have a filter expression like
(|(&(
because I want some human users (these are posixAccounts) and also some "machine users" (these are simpleSecurityO
The problem now is that the %u is only replaced once in that string (cf. authreg_ldap.c, in static int _create_
(|(&(
which obviously won't work.
The function mentioned above needs to be changed in order to fix this.
Changed in jabberd2: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Uh, the issue seems harder to fix than I thought...
Apparently, the cases "only %u", "%u and %r (in that order)", and "%r and %u (in that order)" are hardcoded and replaced by strings that can be handled by printf, i.e. only containing %s as a placeholder. I guess that just substituting %u by the user name and %r by the realm would be a better way.
I would greatly appreciate if someone could fix this issue; for someone who knows C, this shouldn't be too hard.