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

Initial user creation fails when CouchDB admin username contains uppercase characters #7142

Open
jkuester opened this issue Jun 14, 2021 · 0 comments
Labels
Type: Bug Fix something that isn't working as intended

Comments

@jkuester
Copy link
Contributor

jkuester commented Jun 14, 2021

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:

  1. 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.
  2. 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
  3. 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)
@jkuester jkuester added the Type: Bug Fix something that isn't working as intended label Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Fix something that isn't working as intended
Projects
Status: Todo
Development

No branches or pull requests

1 participant