pub struct LoginThrottle { /* private fields */ }Expand description
How long a wrong token buys the next attempt. Nothing on this path had a delay, a counter or a
429: guessing was free, and MIN_TOKEN_LEN allows a 32-character token, which is not a number an
attacker cannot reach given unlimited attempts.
One bucket, not one per peer. The dashboard listens on loopback only, so the user’s browser, a
hostile local process and an SSRF pivot are all 127.0.0.1 — a peer key would put them in the
same bucket anyway. In memory and per process: a restart forgets, and what this buys is that
guessing costs time, not that it is impossible.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LoginThrottle
impl Forget for LoginThrottle
impl Move for LoginThrottle
impl RefUnwindSafe for LoginThrottlewhere
Mutex<Attempts>: RefUnwindSafe,
impl Send for LoginThrottle
impl Sync for LoginThrottle
impl Unpin for LoginThrottle
impl UnsafeUnpin for LoginThrottle
impl UnwindSafe for LoginThrottlewhere
Mutex<Attempts>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more