Yuta Okamoto

Results 25 comments of Yuta Okamoto

Hmm. finagle no longer support Scala 2.10 after 6.35. I recommend you to use Scala 2.11 and its corresponding version instead. https://finagle.github.io/blog/2016/04/20/scala-210-and-java7/

One idea is not to run `clean_expired_user_attempts` in the handler. IMHO, we should not remove existing records especially when they have a chance to be updated.

Another option is to develop a new `DatabaseHandler` which stores an `Attempt` record per request. In this case, the handler calculates a failure count by aggregating the saved records, and...

Hmm, or add `select_for_update()` when getting the records? ```python attempt, created = AccessAttempt.objects.select_for_update().get_or_create(...) ```

How about the following? ```python def is_allowed(self, request, credentials: dict = None) -> bool: ... if settings.AXES_ONLY_ADMIN_SITE and self.is_admin_request(request): return True ... def is_admin_request(self, request) -> bool: if hasattr(request, "path"):...

Agreed. I'm just worried that someone uses `is_admin_site` for their custom handler. I also think the logic depends on `settings` should be placed at `is_allowed` if you can fix all...

Hi, any progress on this?