Skip to content

Commit

Permalink
Add comment about caching get_user_attempts output can be dangerous.
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani authored and aleksihakli committed Dec 1, 2019
1 parent f05ad80 commit eb10ecb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions axes/handlers/database.py
Expand Up @@ -29,6 +29,9 @@
class AxesDatabaseHandler(AxesHandler): # pylint: disable=too-many-locals
"""
Signal handler implementation that records user login attempts to database and locks users out if necessary.
.. note:: The get_user_attempts function is called several time during the authentication and lockout
process, caching its output can be dangerous.
"""

def reset_attempts(self, *, ip_address: str = None, username: str = None) -> int:
Expand Down

0 comments on commit eb10ecb

Please sign in to comment.