RocketChat / RocketChat/Rocket.Chat
Bad escaping character "-" from LDAP #{cn}
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Since version 1.0.0-beta.1 when using #{cn} as a 'field name' in LDAP synchronization, username has bad name escaping with character "-" (only this one) inside:
https://www.dropbox.com/s/0t8g5nyivos9i4i/Zrzut%20ekranu%202019-03-14%2015.39.00.png?dl=0
It should be "frank.white.hd", but now it's bugged to "frank.white.-.hd"
We are using this approach (https://www.dropbox.com/s/s8og4qafhggmrkt/Zrzut%20ekranu%202019-03-14%2015.44.10.png?dl=0), to get nice names in 'Private messages list' (name+surname+department alias):
https://www.dropbox.com/s/nk7h0sn1i12n34g/Zrzut%20ekranu%202019-03-14%2015.37.50.png?dl=0
Steps to reproduce:
- ActiveDirectory: Add "-" to each CommonName field
- RocketChat: Set #{cn} in Field Name in LDAP synch
- RocketChat: Check that username is ugly now :'(
Expected behavior:
Character "-" should be exited like any other is, to null.
Actual behavior:
Character "-" is treated in the username just like other part of name.
Server Setup Information:
- Version of Rocket.Chat Server: 1.0.0-beta.1
- Operating System: debian 9
- Deployment Method: tar
- Number of Running Instances: 2
- DB Replicaset Oplog: on
- NodeJS Version: 8.15.0
- MongoDB Version: 4.0.5
Additional context
It was working just fine in versions below 1.0
Relevant logs:
nope
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.