From 0cf60f045e6e08293e3c97fad473bfff0b43a336 Mon Sep 17 00:00:00 2001 From: Diego Pino Navarro Date: Tue, 17 Aug 2021 14:05:26 -0400 Subject: [PATCH] Only sleep for one second for anonymous. We should really make this more robust. Like allowing same domain AJAX calls to bypass this entirely --- src/Controller/AuthAutocompleteController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/AuthAutocompleteController.php b/src/Controller/AuthAutocompleteController.php index a443a91..e0ddd0d 100644 --- a/src/Controller/AuthAutocompleteController.php +++ b/src/Controller/AuthAutocompleteController.php @@ -177,7 +177,7 @@ public function handleAutocomplete(Request $request, $auth_type, $vocab = 'subje return new JsonResponse($cached->data); } if ($this->currentUser->isAnonymous() && !$is_internal) { - sleep(5); + sleep(1); } switch ($auth_type) {