#26599: Django Passsword Change Form giving wrong POST value for Old Password of
Admin
---------------------------------+----------------------------------------
     Reporter:  shikha-desai     |      Owner:  nobody
         Type:  Bug              |     Status:  new
    Component:  Template system  |    Version:  1.8
     Severity:  Normal           |   Keywords:  Admin:Password Change Form
 Triage Stage:  Unreviewed       |  Has patch:  0
Easy pickings:  0                |      UI/UX:  0
---------------------------------+----------------------------------------
 I have created a link to the Password Change Form using :

 <a href="{% url 'admin:password_change' %}">{% trans 'Change password'
 %}</a>

 The problem is : It works for all web users, but if I login as admin and
 then change the password, say if the original password is:'admin'...Now I
 change it to '1234', it works and I can login again.

 But when I again go to change_password and try to change from '1234' to
 something else, it gives 'Incorrect Old Password'.

 On debugging, I found that the POST request received has the old_password
 field value as 'admin' while I have typed '1234'.

 When I tried to add another field on the html page and updated the
 old_password section as below:
 {{{
 <div class="form-group">
     <div class="control-label col-sm-2">
         {{ form.old_password.label_tag }}
     </div>
     <div class="controls col-sm-10">
         {% dab_field_rendering form.old_password %}
         {{ form.old_password }}
         {% if form.old_password.errors %}<span class="text-danger">{{
 form.old_password.errors|striptags }}</span>{% endif %}
     </div>
 </div>
 }}}

 It works perfectly fine and receives the correct request, but I can't ask
 user to enter the old password two times. There seems to be a problem with
 the code of change password.

--
Ticket URL: <https://code.djangoproject.com/ticket/26599>
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/055.6be11cd1b5244ef6ed57f4ee72d9e4b4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to