Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP sync breaks non ASCII UTF-8 characters in user names after authentication [0.59.2] #8649

Closed
Gummikavalier opened this issue Oct 25, 2017 · 15 comments · Fixed by #8691
Closed
Milestone

Comments

@Gummikavalier
Copy link

Gummikavalier commented Oct 25, 2017

Description:

LDAP sync breaks Nordic characters in user's full name after authentication in 0.59.2.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.59.2
  • Operating System: CentOS 7
  • Deployment Method(snap/docker/tar/etc): tar
  • Number of Running Instances: 5
  • DB Replicaset Oplog: Enabled
  • Node Version: 4.8.4

Steps to Reproduce:

  1. In admin console Enable Layout -> User Interface -> Use Real Name
  2. Upgrade from RC 0.59.1 to 0.59.2
  3. Log out existing session with a user whose name has non ASCII UTF-8 character.
  4. Log back in and observe user name list in admin console. Also type a message as the user.

Expected behavior:

User's name should be ok and contain UTF-8 characters such as ä.

Actual behavior:

User's name has changed both in Admin user list and any new messages to contain wrongly decoded characters such ä (which should be ä).

The issue did not exist in 0.59.1 or earlier.

@Gummikavalier Gummikavalier changed the title LDAP sync breaks Nordic characters in name after authentication in 0.59.2 LDAP sync breaks non ASCII UTF-8 characters in user names after authentication in 0.59.2 Oct 25, 2017
@Gummikavalier Gummikavalier changed the title LDAP sync breaks non ASCII UTF-8 characters in user names after authentication in 0.59.2 LDAP sync breaks non ASCII UTF-8 characters in user names after authentication [0.59.2] Oct 25, 2017
@efih
Copy link

efih commented Oct 26, 2017

have same issue , version 0.59.2

@Gummikavalier
Copy link
Author

Gummikavalier commented Oct 26, 2017

I'll also add that since fullname is used in direct room topic bar (if you have Use Real Name option enabled), ASCII formed full names "leak" from there to the channel list. This happens even if one downgrades back to 0.59.1 and updates users via LDAP, then logs back in, or manually fixes the name in the user list.

I could not find malformed names in the database (didn't know where to look originally), so I had to delete all direct rooms using GUI. (After I had found delete button workaround in #8562 comments.)

@ArchimedesFM
Copy link

We have the same issue with newly imported users username und name - Version 0.59.2
I can edit them manually and they dont break again after LDAP-Sync, but maybe after login but i can't test this.

@Gummikavalier
Copy link
Author

Gummikavalier commented Oct 26, 2017

@ArchimedesFM For us it happened only after doing actual login. Running LDAP sync from the setting didn't trigger it, nor did it fix it afterwards.

Edit: Sorry, I did bad reading. I didn't test fixing the user names manually after login. That might help as a band aid for now.

@efih
Copy link

efih commented Oct 26, 2017

i fix manually also, but after logout&login its happened again

@hartois
Copy link

hartois commented Oct 26, 2017

Also confirmed on 0.59.2

@zahaim
Copy link

zahaim commented Oct 27, 2017

same for Polish characters in 0.59.2

@traxanos
Copy link

traxanos commented Oct 27, 2017

The LDAP Plugin totally broken.

  • During the sync LDAP fields are wrong escaped.
  • The manual sync doesn't work correctly - it will only sync new user because the function importNewUsers will be called only.
  • The automatic sync will not work, too. It doesn't start the cron like the description.

Only the sync during the login by user will work, but with broken escaping.

@traxanos
Copy link

So the first patch ist for fixing manual sync:
https://gist.github.com/traxanos/ed7a0ce104fd0afa170f20d509d4d459

traxanos referenced this issue Oct 27, 2017
[FIX] LDAP not merging existent users && Wrong id link generation
@traxanos
Copy link

The other problem why special chars are broken is the handling with ldap fields as BINARY!!!
What the hell why the use the field as binary!

e2b0379

When you revert this the encoding is working again.

@rodrigok
Copy link
Member

Thanks guys, I'll take a look ASAP

@rodrigok
Copy link
Member

Guys, version 0.59.3 is building and will be available soon with this fix.

@rodrigok
Copy link
Member

Please let me know if there are more issues related to LDAP

@Gummikavalier
Copy link
Author

Seems to work ok for us with 0.59.3. Thanks! :)

@deogracia
Copy link

with 0.59.3, works for me now. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants