You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 14, 2024. It is now read-only.
I suppose this has probably been worked around in a current version, but I'm documenting it here for posterity, in case someone else runs into the same issue with another project that requires an earlier ldapjs / ldap-filter.
However, add a space and you get Uncaught Error: missing paren:
> f = parseFilter('(&(objectclass=organizationalPerson)(|(memberOf=CN=group1,OU=foo,DC=org) (memberOf=CN=group2,OU=foo,DC=org)))');Uncaught Error: missing paren at parseFilter (/usr/src/app/node_modules/ldap-filter/lib/index.js:198:13) at parseFilter (/usr/src/app/node_modules/ldap-filter/lib/index.js:213:13) at parseFilter (/usr/src/app/node_modules/ldap-filter/lib/index.js:204:13) at Object.parse (/usr/src/app/node_modules/ldap-filter/lib/index.js:252:18) at parseString (/usr/src/app/node_modules/ldapjs/lib/filters/index.js:179:27)
Note that the only tiny difference in the above, relative the previous one, is the single space between the two terms of the | expression. By comparison, ldapsearch accepts this expression, no issue.
The error message is better than nothing, I guess, but it's not technically correct either—the paren is there, it's just after a space that the parser didn't expect.
Workaround
Remove all spaces in between the terms of a & or | expression. I welcome corrections if I'm using the wrong terminology here, too, since this isn't stuff I work with every day.
Resolution
Closing, because I don't have the wherewithal to test with 3.x right now. Drop a comment if you're still affected by this problem with the current version(s) out there and wish to have the issue re-opened.
The text was updated successfully, but these errors were encountered:
I suppose this has probably been worked around in a current version, but I'm documenting it here for posterity, in case someone else runs into the same issue with another project that requires an earlier
ldapjs
/ldap-filter
.This works as expected:
However, add a space and you get
Uncaught Error: missing paren
:Note that the only tiny difference in the above, relative the previous one, is the single space between the two terms of the
|
expression. By comparison,ldapsearch
accepts this expression, no issue.The error message is better than nothing, I guess, but it's not technically correct either—the paren is there, it's just after a space that the parser didn't expect.
Workaround
Remove all spaces in between the terms of a
&
or|
expression. I welcome corrections if I'm using the wrong terminology here, too, since this isn't stuff I work with every day.Resolution
Closing, because I don't have the wherewithal to test with 3.x right now. Drop a comment if you're still affected by this problem with the current version(s) out there and wish to have the issue re-opened.
The text was updated successfully, but these errors were encountered: