SECURITY: Add throttling for BotPasswords authentication attempts
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 19 May 2017 21:35:11 +0000 (23:35 +0200)
committerReedy <reedy@wikimedia.org>
Wed, 15 Nov 2017 00:58:44 +0000 (00:58 +0000)
commit25390162c755eb19077310fc04b8f3d19bf1dc23
tree5804f57f94c7e56a76e242cafe539980be03a91f
parentfea3bbcdae4f052f769ab466df6e1f5d47d1383c
SECURITY: Add throttling for BotPasswords authentication attempts

ApiLogin which will currently always try an AuthManager login which will
by default throttle via ThrottlePreAuthenticationProvider, but this only
happens after the BotPassword is checked so it's still possible to keep
trying to break the bot password.

There's a potential odd-behavior mode here: if the main account username
and password looks like a BotPasswords username and password, a
successful main account login will increment the BotPasswords throttle
for the user and not reset it after the successful main account login.
That seems such an odd edge case I say let's not worry about it.

Bug: T165846
Change-Id: Ie60f0e05c2a94722b91bc3a80c80346e28b443f4
includes/api/ApiLogin.php
includes/user/BotPassword.php