Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/werkzeug/debug/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ def check_pin_trust(self, environ: WSGIEnvironment) -> bool | None:
"""
if self.pin is None:
return True

# If we failed too many times, then we're locked out.
if self._failed_pin_auth.value >= 10:
return False

val = parse_cookie(environ).get(self.pin_cookie_name)
if not val or "|" not in val:
return False
Expand Down Expand Up @@ -487,7 +492,7 @@ def pin_auth(self, request: Request) -> Response:
auth = True

# If we failed too many times, then we're locked out.
elif self._failed_pin_auth.value > 10:
elif self._failed_pin_auth.value >= 10:
exhausted = True

# Otherwise go through pin based authentication
Expand Down
Loading