#36901: Centralize mitigations against timing attacks targeting user enumeration
-------------------------------------+-------------------------------------
     Reporter:  Jacob Walls          |                    Owner:  Afenomamy
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |
    Component:  contrib.auth         |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Afenomamy):

 So my plan is :
 1 -  Create two utility functions called **get_user_with_mitigation** and
 **aget_user_with_mitigation** inside django.contrib.auth.__init__.py.
 2 -  Update **django.contrib.auth.handlers.modwsgi.check_password** to use
 ''get_user_with_mitigation''
 3 -  Refactor authenticate and aauthenticate in
 **django.contrib.auth.backends.py** to use  ''get_user_with_mitigation and
 aget_user_with_mitigation'' .


 NB :
     - For **Attribute Safety**: getattr(user, 'is_active', True) will be
 used to  ensure compatibility with custom user models that do not define
 an is_active field. This will resolve the reported AttributeError.
     - For **Performance:**   make_password  will be called directly for
 the dummy hashing. This avoids the overhead of instantiating a UserModel
 instance simply to call set_password().
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36901#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019d3f0a3e69-8940c171-b297-42b3-920c-502b4eb2b408-000000%40eu-central-1.amazonses.com.

Reply via email to