Skip to content

Commit 27a87fe

Browse files
committed
fix: added missing authentication check
1 parent 92fe412 commit 27a87fe

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

phpmyfaq/src/phpMyFAQ/Controller/Frontend/AutoCompleteController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use phpMyFAQ\Category;
2121
use phpMyFAQ\Configuration;
2222
use phpMyFAQ\Controller\AbstractController;
23+
use phpMyFAQ\Core\Exception;
2324
use phpMyFAQ\Faq\FaqPermission;
2425
use phpMyFAQ\Filter;
2526
use phpMyFAQ\Helper\SearchHelper;
@@ -34,6 +35,9 @@
3435

3536
class AutoCompleteController extends AbstractController
3637
{
38+
/**
39+
* @throws Exception
40+
*/
3741
#[Route('api/autocomplete')]
3842
public function search(Request $request): JsonResponse
3943
{

phpmyfaq/src/phpMyFAQ/Controller/Frontend/UserController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ public function updateData(Request $request): JsonResponse
127127
#[Route('api/user/password/update', methods: ['PUT'])]
128128
public function updatePassword(Request $request): JsonResponse
129129
{
130+
$this->userIsAuthenticated();
131+
130132
$configuration = Configuration::getConfigurationInstance();
131133
$user = CurrentUser::getCurrentUser($configuration);
132134

0 commit comments

Comments
 (0)