#10026 closed (worksforme)
Possible error in django.contrib.auth.views.password_reset_confirm
Reported by: | Jason Mayfield | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Keywords: | password reset | |
Cc: | jwmayfield@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Was getting this error:
[Django] Error (EXTERNAL IP): /reset/a6-29j-f7bb4a0b3867c9d3024a/ Traceback (most recent call last): File "/usr/local/src/django/django/core/handlers/base.py", line 86, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/usr/local/src/django/django/contrib/auth/views.py", line 122, in password_reset_confirm context_instance['validlink'] = True File "/usr/local/src/django/django/template/context.py", line 36, in __setitem__ self.dicts[0][key] = value TypeError: 'str' object does not support item assignment
Quick and dirty fix attached.
Attachments (2)
Change History (7)
by , 16 years ago
Attachment: | confirm.diff added |
---|
follow-up: 2 comment:1 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Cc: | added |
---|
Sorry about the patch. I ended up using something slightly different, because even my papering over the problem didn't work long-term.
This is the first time I'd used the password reset function in 1.0 (this particular install is on rev 9843), and the password_reset_confirm view threw the error referenced above, that 'str' doesn't support item assignment. I didn't have time for deep debugging so ended up changing the function like the new attached diff.
by , 16 years ago
Attachment: | django_contrib_auth_views.diff added |
---|
comment:3 by , 16 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Appears to be working correctly now. I don't know what exact revision I may have been on when the error happened in the first place. Next time I'll do better analysis before submitting the bug report.
comment:4 by , 14 years ago
In case anyone stumbles into this error, this can happen if one of your context processors mistakenly returns a string.
In the future, please generate patches from the root of the SVN tree. There are 22 files in the Django tree named "views.py", and without knowing to which one this patch applies it took a bit of time to figure out what you were trying to fix here.
I'm also fairly sure this patch just papers over the problem and doesn't get to the root cause. Can you share more details about your setup to help us reproduce this?