Skip to content

Django admin login does not lowercase the email, rejects valid credentials #143

Description

@OriginDevIT

#127 added lowercasing to OperatorAuthenticationForm, but the console-host Django admin at /admin/ uses Django's own AdminAuthenticationForm, which passes the raw input to get_by_natural_key. Operator emails are stored lowercased (tenants/models.py), so a mixed-case entry is rejected with 'Please enter the correct email and password for a staff account' while the same credentials succeed at the OSDS login form on the same host. Inconsistent between two login forms one path apart. Fix: subclass AdminAuthenticationForm with the same lowercasing and set it on the admin site. Found in the #127 browser pass.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions