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
The function parseDistinguishedName(dn) returns dn.replace('\\,', '\\\\,') but when the first argument for replace is a string (like in this scenario), only the first instance of said string is replaced. (source)
Thus, when dn has multiple instances of \\, then dn will not be properly escaped and some functions may not behave as expected. I ran into this issue when getGroupMembershipForUser() would return an empty array but no errors.
A potential solution would be to replace the return with something like: return(dn.split('\\,').join('\\\\,'));. So far this has been working for me, but please let me know if I'm missing anything. I will create a PR for this soon. Thanks!
The text was updated successfully, but these errors were encountered:
The function
parseDistinguishedName(dn)
returnsdn.replace('\\,', '\\\\,')
but when the first argument forreplace
is a string (like in this scenario), only the first instance of said string is replaced. (source)Thus, when
dn
has multiple instances of\\,
thendn
will not be properly escaped and some functions may not behave as expected. I ran into this issue whengetGroupMembershipForUser()
would return an empty array but no errors.A potential solution would be to replace the return with something like:
return(dn.split('\\,').join('\\\\,'));
. So far this has been working for me, but please let me know if I'm missing anything. I will create a PR for this soon. Thanks!The text was updated successfully, but these errors were encountered: