#30556: ModelBackend.authenticate() shouldn't make a database query when 
username
is None
-------------------------------------+-------------------------------------
     Reporter:  Aymeric Augustin     |                    Owner:  Aymeric
         Type:                       |  Augustin
  Cleanup/optimization               |                   Status:  closed
    Component:  contrib.auth         |                  Version:  master
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"3ee0834a4652fb9eb8b69e09c3541901739021de" 3ee0834a]:
 {{{
 #!CommitTicketReference repository=""
 revision="3ee0834a4652fb9eb8b69e09c3541901739021de"
 Fixed #30556 -- Avoided useless query and hasher call in
 ModelBackend.authenticate() when credentials aren't provided.

 There's no need to fetch a user instance from the database unless
 a username and a password are provided as credentials.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30556#comment:4>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.cd3cc806eff871ccd8b3415d2b8494de%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to