diff --git a/django/contrib/auth/backends.py b/django/contrib/auth/backends.py
index 6b31f72..d61c6b0 100644
a
|
b
|
class ModelBackend(object):
|
10 | 10 | |
11 | 11 | def authenticate(self, username=None, password=None, **kwargs): |
12 | 12 | UserModel = get_user_model() |
| 13 | |
| 14 | user = UserModel() |
| 15 | user.set_password("if user doesn't exist we still want to be slow") |
| 16 | |
13 | 17 | if username is None: |
14 | 18 | username = kwargs.get(UserModel.USERNAME_FIELD) |
15 | 19 | try: |
… |
… |
class ModelBackend(object):
|
17 | 21 | if user.check_password(password): |
18 | 22 | return user |
19 | 23 | except UserModel.DoesNotExist: |
| 24 | user.check_password("this won't match that!") |
20 | 25 | return None |
21 | 26 | |
22 | 27 | def get_group_permissions(self, user_obj, obj=None): |