Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We were checking the login throttle at the beginning of every SASL conversation. This had several problems: 1. Pidgin (on Windows?) tries every mechanism in order, regardless of the CAP advertisement. It would use up the default throttle allowance trying unsupported mechanisms like CRAM-MD5. 2. The throttle was actually checked twice for AUTHENTICATE PLAIN (once at the start of the conversation and once in AuthenticateByPassphrase). The general pattern here is that we should check the throttle every time we do something "expensive" (bcrypt verification, send a reset email) or "dangerous" (anything that could lead to a bruteforce attack on passwords). Therefore, delete the check from the AUTHENTICATE handler, and add one at the beginning of the SCRAM conversation to replace it.
- Loading branch information