mcavage/node-ldapjs — Issue #48: Xml Strings in a filter?
Author: cbaker118
Created: 2012-01-12 19:45:55+00:00
State: open

Hey all, I'm trying to use a filter that has xml in a substring, but I keep getting the following error:

Error: Invalid filter: "+groupName+"*)(objectClass=User)",
scope: "sub"
};

client.search("o=central",opts, function(err,res){
...
});

I've also tried putting single quotes around the xml substring I'm looking for, as well as escaping the all < and > with \, but all throw the same error. Is there an escape character used in the filter parser?

Also, I've had to write some javascript in the past to convert a canonical ldap filter string into a DSML document, and it seems to handle xml ok because it builds an operator / operand tree in memory. By doing this it can tell the difference between an xml tag and a greater or less than operator (as long as the filter is well formed at least). If you would like to look at that code let me know.