File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 * Class UserLoginTurnstileTest
2424 *
2525 * Covers Cloudflare Turnstile integration in UserController::postLogin():
26- * - cf-turnstile-response required when login_attempts (from request body ) >= threshold
26+ * - cf-turnstile-response required when captcha_failed_attempts (session ) >= threshold
2727 * - threshold gating (before / at boundary / above boundary)
28- * - omitted login_attempts field defaults to zero (no captcha required)
29- * - captcha is gated on the request-body counter
28+ * - absent captcha_failed_attempts in session defaults to 0 (no captcha required)
29+ * - captcha gate is driven by the server-side session counter, not the request body
30+ * - request-body login_attempts is ignored (attacker cannot bypass by posting 0)
31+ * - enumeration safety: captcha fires for non-existent users too
3032 * - login screen emits Turnstile JS config after a failed attempt
3133 * - expired or unsolved token is rejected
34+ * - successful login clears the session counter
3235 */
3336final class UserLoginTurnstileTest extends BrowserKitTestCase
3437{
@@ -285,4 +288,4 @@ public function testSuccessfulLoginClearsSessionCounter(): void
285288 'captcha_failed_attempts must be removed from session after a successful login '
286289 );
287290 }
288- }
291+ }
You can’t perform that action at this time.
0 commit comments