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

Username minimum length in 3.7 is too restricting #5794

Closed
asalmela opened this issue Mar 17, 2017 · 13 comments
Closed

Username minimum length in 3.7 is too restricting #5794

asalmela opened this issue Mar 17, 2017 · 13 comments

Comments

@asalmela
Copy link

We have several accounts in LDAP with two letter usernames, and 3.7 introduced minimum length of 3 letters. These accounts are now represented as long alphanumeric strings which cannot be modified.

Is there any possibility to relax this limit a little?

@jasonblais
Copy link
Contributor

Hey @asalmela, thanks for the report

We're now considering a patch fix for Mattermost 3.7.2, which reduces the minimum username length requirement to 2 characters.

You can see more details on our public Mattermost instance.

@jasonblais
Copy link
Contributor

@asalmela v3.7.2 is now out and available on our download page.

It reduces the server-side minimum length from 3 to 1, matching what we had in Mattermost v3.6 and earlier

@napcae
Copy link

napcae commented Mar 20, 2017

Unfortunately this issue is not resolved for me yet. Although usernames are displayed correctly in the header, the userlist still shows the user ids instead of the usernames.
I attached two screenshots.

screen shot 2017-03-20 at 08 57 09
(Note, usernames with two characters are also displayed correctly)

screen shot 2017-03-20 at 08 57 15

@jasonblais
Copy link
Contributor

jasonblais commented Mar 20, 2017

Hm - that seems like a separate issue @napcae - or is it only restricted to usernames with one or two characters.

Which authentication method are you using? If you have LDAP, can you try running the LDAP synchronization manually to make sure you have latest user attributes pulled, from System Console > AD/LDAP > AD/LDAP Synchronize Now

@napcae
Copy link

napcae commented Mar 20, 2017

It is restricted to usernames with two characters(maybe also one character, but we only have usernames with two or more characters).

I did what you said, but the issue is still not resolved. We are using AD btw.

@jasonblais
Copy link
Contributor

Can you help take a screenshot of the About Mattermost dialog (it can be found from Mattermost three-dotted Main Menu next to your username in the header > About Mattermost), just to confirm the upgrade to 3.7.2 was successful.

@napcae
Copy link

napcae commented Mar 20, 2017

screen shot 2017-03-20 at 13 58 59

@jasonblais
Copy link
Contributor

Thanks @napcae, appreciate it.

To summarize:

  • upgraded to 3.7.2 (postgres server)
  • performed manual LDAP sync

Observed:

  • user accounts are displayed correctly in the top left header (e.g. ja)
  • user accounts are however displayed with a user_id in the direct message list

May I ask few more questions:

  1. What is their username shown in the message panel?
  2. What is their username shown in the at-mention autocomplete?
    • you can display the autocomplete by typing @ in a message box
  3. What is their username shown in the profile popover, which you get by clicking the profile picture of the user?
  4. If one of the user accounts logs into Mattermost, is their username displayed correctly in the direct message sidebar, or does it continue to be incorrect?

@napcae
Copy link

napcae commented Mar 20, 2017

So apparently the usernames(with two characters) are back now. The issue is resolved. Maybe the AD/LDAP Sync did work indeed and names were just cached(?).
Anyway, thanks for your help @jasonblais !

@jasonblais
Copy link
Contributor

Awesome! Glad to hear the issue is fixed @napcae 👍

@napcae
Copy link

napcae commented Mar 20, 2017

Appreciate your assistance :)

@beckf
Copy link

beckf commented Apr 13, 2017

@napcae I am seeing the same problem with usernames. Any idea what you did to resolve it? I tried clearing caches, and resyncing LDAP.

@jasonblais
Copy link
Contributor

Thanks @beckf for the report

We made a change to properly validate the usernames when creating users via the API: #5581

However, it looks like it's causing issues with LDAP usernames as you reported here https://forum.mattermost.org/t/username-incorrect-after-upgrade-to-3-7-3/3150. We have a ticket to revert this change, which is considered for Mattermost v3.8.1: https://mattermost.atlassian.net/browse/PLT-6334

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

No branches or pull requests

4 participants