You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When starting the services for the first time with a fresh (empty) CouchDB instance (particularly as described in the DEVELOPMENT documentation), if the username for the initial admin user for CouchDB contains uppercase characters, that user will not be able to login to Medic. All of the servers will start successfully, but the login for the existing admin user will fail.
To Reproduce
Steps to reproduce the behavior:
Follow the DEVELOPMENT steps for starting the framework, except, instead of using the recommended myadminuser as the CouchDB admin username, use something with uppercase characters like MyAdminUser.
Once you have started the webapp and the API, navigate to http://localhost:5988/medic/login and try to login with your CouchDB admin username/password
The login will fail with a 401
Expected behavior
Under normal circumstances, Medic does not allow for creating users with usernames that contain banned characters (such as uppercase). Any old Medic users that happened to have invalid usernames should be corrected automatically by the extract-user-settings migration. So, normal users added via the API should not encounter this problem. It is just existing users from CouchDB.
It seems like we should try to find a more graceful way to handle this situation. Perhaps if the lower case version of the username fails, we try the case as entered or if we want to still fail the login, at least fail with a more helpful message...
Environment
Instance: local
Browser: Chrome
Client platform: Linux
Version: 3.11.0 (master)
The text was updated successfully, but these errors were encountered:
Describe the bug
When starting the services for the first time with a fresh (empty) CouchDB instance (particularly as described in the DEVELOPMENT documentation), if the username for the initial admin user for CouchDB contains uppercase characters, that user will not be able to login to Medic. All of the servers will start successfully, but the login for the existing admin user will fail.
To Reproduce
Steps to reproduce the behavior:
myadminuser
as the CouchDB admin username, use something with uppercase characters likeMyAdminUser
.http://localhost:5988/medic/login
and try to login with your CouchDB admin username/passwordExpected behavior
Under normal circumstances, Medic does not allow for creating users with usernames that contain banned characters (such as uppercase). Any old Medic users that happened to have invalid usernames should be corrected automatically by the extract-user-settings migration. So, normal users added via the API should not encounter this problem. It is just existing users from CouchDB.
It seems like we should try to find a more graceful way to handle this situation. Perhaps if the lower case version of the username fails, we try the case as entered or if we want to still fail the login, at least fail with a more helpful message...
Environment
The text was updated successfully, but these errors were encountered: