Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

groupname with parentheses in it crashes FindGroups  #91

Description

@jurjendijkstra

Our nodejs server crashes when a group has a name like "xxx users (production)"

(node:6344) UnhandledPromiseRejectionWarning: Error: illegal unescaped char: (
at escapeValue (xxx\src\node_modules\ldap-filter\lib\index.js:49:13)
at parseExpr (xxx\src\node_modules\ldap-filter\lib\index.js:167:16)
at parseFilter (xxx\src\node_modules\ldap-filter\lib\index.js:228:14)
at parseFilter (xxx\src\node_modules\ldap-filter\lib\index.js:204:13)
at Object.parse (xxx\src\node_modules\ldap-filter\lib\index.js:252:18)
at Object.parseString (xxx\src\node_modules\ldapjs\lib\filters\index.js:180:27)
at Client.search (xxx\src\node_modules\ldapjs\lib\client\client.js:567:30)
at Searcher.search (xxx\src\node_modules\activedirectory2\lib\components\search.js:118:15)
at search (xxx\src\node_modules\activedirectory2\lib\components\search.js:352:19)
at GroupsFinder.find (xxx\src\node_modules\activedirectory2\lib\components\findGroups.js:113:3)
at findGroups (xxx\src\node_modules\activedirectory2\lib\components\findGroups.js:168:23)
at PromisedAD.findGroup (xxx\src\node_modules\activedirectory2\lib\activedirectory.js:798:3)

to do:

  1. handle the promise rejection when it happens. That may be a responsibility of my application, or maybe somewhere inside activedirectory2, don't know yet
  2. escape the groupname when we write the ldap query, similar to how we escape usernames in the ldap query.

I want to try and submit a pull request, but I am a bit swamped in work currently, so it may take me a while

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions