Skip to content

Commit

Permalink
Use request stack in redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Oct 26, 2024
1 parent bd8b539 commit 15f4b6d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Form/Challenge.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ public function buildForm(array $form, FormStateInterface $form_state) {
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$session = $this->requestStack->getCurrentRequest()->getSession();
$request = $this->requestStack->getCurrentRequest();
$session = $request->getSession();
$session->set('turnstile_protect_pass', TRUE);

$destination = \Drupal::request()->query->get('destination');
$destination = $request->query->get('destination');
if (!$destination) {
$destination = '/';
}
Expand Down

0 comments on commit 15f4b6d

Please sign in to comment.