RocketChat / RocketChat/Rocket.Chat
Ldap sync problem : array fields not casted to string
Open
Nobody has claimed this yet.
area: authentication
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Hi !
Version 0.59.3
I found a bug when a LDAP field is an array of values (several emails for example), values of the array are not casted to string, so items of this attribute stay as Buffer object, in LDAP.prototype.extractLdapEntryData (rocketchat_ldap.js)
I fixed the problem by adding this lines at line 461 of rocketchat_ldap.js
if(Array.isArray(value)) {
value = _.map(value, function(v) {
return v instanceof Buffer ? v.toString() : v;
});
}
Best
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.