From 526b548cfb9c8a02ea2b7ae064ef3b795305d51a Mon Sep 17 00:00:00 2001 From: KANIN KEARPIMY Date: Tue, 31 Mar 2026 22:56:13 +0700 Subject: Fixed #36542 -- Marked authenticate() with @sensitive_variables() decorator. Thanks Olivier Dalang, Tim McCurrach, Sarah Boyce, and Mar Bartolome for reviews. --- tests/auth_tests/models/custom_user.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/auth_tests/models') diff --git a/tests/auth_tests/models/custom_user.py b/tests/auth_tests/models/custom_user.py index dac61f8e68..29dc42f645 100644 --- a/tests/auth_tests/models/custom_user.py +++ b/tests/auth_tests/models/custom_user.py @@ -143,3 +143,17 @@ with RemoveGroupsAndPermissions(): custom_objects = UserManager() REQUIRED_FIELDS = AbstractUser.REQUIRED_FIELDS + ["date_of_birth"] + + +class ErrorUserManager(BaseUserManager): + def get_by_natural_key(self, _): + raise TypeError + + async def aget_by_natural_key(self, _): + raise TypeError + + +with RemoveGroupsAndPermissions(): + + class ErrorAdminUser(AbstractUser): + custom_objects = ErrorUserManager() -- cgit v1.3