From ace9ccfe9f6b987861404fdf08d22a5663953713 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 24 Jul 2012 19:03:26 -0700 Subject: [PATCH] Fixed #18666 -- when upgrading a user's password to a new algorithm only save the password field to the databaes. --- django/contrib/auth/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py index 39d9e8408d..1099aa195b 100644 --- a/django/contrib/auth/models.py +++ b/django/contrib/auth/models.py @@ -299,7 +299,7 @@ class User(models.Model): """ def setter(raw_password): self.set_password(raw_password) - self.save() + self.save(update_fields=["password"]) return check_password(raw_password, self.password, setter) def set_unusable_password(self):