Skip to content

Commit 5f9de11

Browse files
feat(captcha): Redirect to / after captcha resolution
1 parent e92c82a commit 5f9de11

File tree

2 files changed

+1
-2115
lines changed

2 files changed

+1
-2115
lines changed

src/AbstractBounce.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,12 @@ protected function handleCaptchaRemediation($ip)
266266

267267
if (null === $this->getSessionVariable('crowdsec_captcha_has_to_be_resolved')) {
268268
// Set up the first captcha remediation.
269-
270269
$this->storeNewCaptchaCoupleInSession();
271270
$this->setSessionVariable('crowdsec_captcha_has_to_be_resolved', true);
272271
$this->setSessionVariable('crowdsec_captcha_resolution_failed', false);
273272
$this->setSessionVariable('crowdsec_captcha_resolution_redirect', 'POST' === $this->getHttpMethod() &&
274273
!empty($_SERVER['HTTP_REFERER']) ?
275-
$_SERVER['HTTP_REFERER'] : $_SERVER['REQUEST_URI']);
274+
$_SERVER['HTTP_REFERER'] : '/');
276275
}
277276

278277
// Display captcha page if this is required.

0 commit comments

Comments
 (0)