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

[Help Wanted] [PLT-5667] Automatically convert usernames to lowercase letters on sign in #5585

Closed
esethna opened this Issue Mar 1, 2017 · 13 comments

Comments

Projects
None yet
5 participants
@esethna
Copy link
Member

esethna commented Mar 1, 2017

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide, specifically for machine setup and for developer workflow.


Notes: Jira ticket

Automatically convert usernames to lowercase letters on sign in

Repro of issue:

  1. Create an account with username "Jason"
    -- username is converted to lowercase ("jason") in the database
  2. Try to log in with that username

Observed: "We couldn't match your credentials" error
Expected: Username converted to lowercase ("jason") on sign in so login is successful

@cpanato

This comment has been minimized.

Copy link
Member

cpanato commented Mar 1, 2017

I can work on that

@cpanato

This comment has been minimized.

Copy link
Member

cpanato commented Mar 2, 2017

@esethna I created a user with username Carlos, and after that, I was able to login using Carlos or carlos as a username in the login page. Both works.

I used master as base.

@jasonblais

This comment has been minimized.

Copy link
Member

jasonblais commented Mar 2, 2017

@cpanato I tried on master and I get the following

image

But signing in with jason123456 works.

@cpanato

This comment has been minimized.

Copy link
Member

cpanato commented Mar 2, 2017

@jasonblais let me try again

@cpanato

This comment has been minimized.

Copy link
Member

cpanato commented Mar 2, 2017

@jasonblais
lmvjpbrj1v

then I dont know what I'm doing wrong

@jasonblais

This comment has been minimized.

Copy link
Member

jasonblais commented Mar 2, 2017

Hmm, interesting. It looks like it only reproduces on a PostgreSQL server.

If I try on MySQL, it works fine. Is your local environment on MySQL?

@cpanato

This comment has been minimized.

Copy link
Member

cpanato commented Mar 2, 2017

I have both docker postgres/mysql.
now the question :) : how can I use mysql instead of postgress ? @jasonblais
there are any docs about that?

@cpanato

This comment has been minimized.

Copy link
Member

cpanato commented Mar 2, 2017

@jasonblais is it in the config.json?

"SqlSettings": {
        "DriverName": "mysql",
        "DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8",
        "DataSourceReplicas": [],
        "MaxIdleConns": 20,
        "MaxOpenConns": 300,
        "Trace": false,
        "AtRestEncryptKey": "sgrkr8r3xr5k4ux57t6y5minc79fedgf"
    },

what is the config for postgres ?

@jasonblais

This comment has been minimized.

Copy link
Member

jasonblais commented Mar 2, 2017

We don't currently have support for migrating between databases automatically, as far as I know.

But I would ask in the developers channel on pre-release, as they might know.

@cpanato

This comment has been minimized.

Copy link
Member

cpanato commented Mar 3, 2017

this issue happen when using Postgres.
I will fix that on the webapp to make lowercase the loginid

@cpanato

This comment has been minimized.

Copy link
Member

cpanato commented Mar 3, 2017

PR - #5613

@realrolfje

This comment has been minimized.

Copy link

realrolfje commented Apr 2, 2017

This problem seems re-introduced in 3.7.2 running on PostgreSQL.

@jasonblais

This comment has been minimized.

Copy link
Member

jasonblais commented Apr 2, 2017

Thanks @realrolfje for the report! The PR will actually be included in Mattermost 3.8 to be released on April 16th, so it's coming soon :)

#5613

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment