Release 2.23.0 (#5075)

This commit is contained in:
Kevin Papst
2024-10-03 10:34:20 +02:00
committed by GitHub
parent 40154be8f9
commit fb9a0dc499
142 changed files with 855 additions and 910 deletions

View File

@@ -30,7 +30,7 @@ final class BookmarkController extends AbstractController
public const PARAM_DATATABLE = 'datatable_name';
public const PARAM_PROFILE = 'datatable_profile';
public function __construct(private BookmarkRepository $bookmarkRepository, private ProfileManager $profileManager)
public function __construct(private readonly BookmarkRepository $bookmarkRepository, private readonly ProfileManager $profileManager)
{
}
@@ -41,11 +41,11 @@ final class BookmarkController extends AbstractController
throw $this->createNotFoundException('Missing CSRF Token');
}
if (!$csrfTokenManager->isTokenValid(new CsrfToken(self::DATATABLE_TOKEN, $request->request->get(self::PARAM_TOKEN_NAME)))) {
if (!$csrfTokenManager->isTokenValid(new CsrfToken(self::DATATABLE_TOKEN, (string) $request->request->get(self::PARAM_TOKEN_NAME)))) {
throw $this->createAccessDeniedException('Invalid CSRF Token');
}
$profile = $request->request->get(self::PARAM_PROFILE);
$profile = (string) $request->request->get(self::PARAM_PROFILE);
if (!$this->profileManager->isValidProfile($profile)) {
throw $this->createNotFoundException('Invalid profile given');
}
@@ -63,16 +63,16 @@ final class BookmarkController extends AbstractController
throw $this->createNotFoundException('Missing data: csrf token, datatable name or profile');
}
if (!$csrfTokenManager->isTokenValid(new CsrfToken(self::DATATABLE_TOKEN, $request->request->get(self::PARAM_TOKEN_NAME)))) {
if (!$csrfTokenManager->isTokenValid(new CsrfToken(self::DATATABLE_TOKEN, (string) $request->request->get(self::PARAM_TOKEN_NAME)))) {
throw $this->createAccessDeniedException('Invalid CSRF Token');
}
$profile = $request->request->get(self::PARAM_PROFILE);
$profile = (string) $request->request->get(self::PARAM_PROFILE);
if (!$this->profileManager->isValidProfile($profile)) {
throw $this->createNotFoundException('Invalid profile given');
}
$datatableName = $request->request->get(self::PARAM_DATATABLE);
$datatableName = (string) $request->request->get(self::PARAM_DATATABLE);
$datatableName = $this->profileManager->getDatatableName($datatableName, $profile);
if (empty($datatableName) || mb_strlen($datatableName) > 50) {
@@ -116,16 +116,16 @@ final class BookmarkController extends AbstractController
throw $this->createNotFoundException('Missing data: csrf token, datatable name or profile');
}
if (!$csrfTokenManager->isTokenValid(new CsrfToken(self::DATATABLE_TOKEN, $request->request->get(self::PARAM_TOKEN_NAME)))) {
if (!$csrfTokenManager->isTokenValid(new CsrfToken(self::DATATABLE_TOKEN, (string) $request->request->get(self::PARAM_TOKEN_NAME)))) {
throw $this->createAccessDeniedException('Invalid CSRF Token');
}
$profile = $request->request->get(self::PARAM_PROFILE);
$profile = (string) $request->request->get(self::PARAM_PROFILE);
if (!$this->profileManager->isValidProfile($profile)) {
throw $this->createNotFoundException('Invalid profile given');
}
$datatableName = $request->request->get(self::PARAM_DATATABLE);
$datatableName = (string) $request->request->get(self::PARAM_DATATABLE);
$datatableName = $this->profileManager->getDatatableName($datatableName, $profile);
$bookmark = $this->bookmarkRepository->findBookmark($this->getUser(), Bookmark::COLUMN_VISIBILITY, $datatableName);