mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-10 03:24:12 +01:00
N°8017 - Security - dependabot - Symfony's VarDumper vulnerable to un… (#731)
Upgrade all Symfony components to last security fix (~6.4.0)
This commit is contained in:
@@ -163,7 +163,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
|
||||
/**
|
||||
* Returns a BinaryFileResponse object with original or customized file name and disposition header.
|
||||
*/
|
||||
protected function file(\SplFileInfo|string $file, string $fileName = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT): BinaryFileResponse
|
||||
protected function file(\SplFileInfo|string $file, ?string $fileName = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT): BinaryFileResponse
|
||||
{
|
||||
$response = new BinaryFileResponse($file);
|
||||
$response->setContentDisposition($disposition, $fileName ?? $response->getFile()->getFilename());
|
||||
@@ -248,7 +248,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
|
||||
* If an invalid form is found in the list of parameters, a 422 status code is returned.
|
||||
* Forms found in parameters are auto-cast to form views.
|
||||
*/
|
||||
protected function render(string $view, array $parameters = [], Response $response = null): Response
|
||||
protected function render(string $view, array $parameters = [], ?Response $response = null): Response
|
||||
{
|
||||
return $this->doRender($view, null, $parameters, $response, __FUNCTION__);
|
||||
}
|
||||
@@ -259,7 +259,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
|
||||
* If an invalid form is found in the list of parameters, a 422 status code is returned.
|
||||
* Forms found in parameters are auto-cast to form views.
|
||||
*/
|
||||
protected function renderBlock(string $view, string $block, array $parameters = [], Response $response = null): Response
|
||||
protected function renderBlock(string $view, string $block, array $parameters = [], ?Response $response = null): Response
|
||||
{
|
||||
return $this->doRender($view, $block, $parameters, $response, __FUNCTION__);
|
||||
}
|
||||
@@ -271,7 +271,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
|
||||
*
|
||||
* @deprecated since Symfony 6.2, use render() instead
|
||||
*/
|
||||
protected function renderForm(string $view, array $parameters = [], Response $response = null): Response
|
||||
protected function renderForm(string $view, array $parameters = [], ?Response $response = null): Response
|
||||
{
|
||||
trigger_deprecation('symfony/framework-bundle', '6.2', 'The "%s::renderForm()" method is deprecated, use "render()" instead.', get_debug_type($this));
|
||||
|
||||
@@ -281,7 +281,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
|
||||
/**
|
||||
* Streams a view.
|
||||
*/
|
||||
protected function stream(string $view, array $parameters = [], StreamedResponse $response = null): StreamedResponse
|
||||
protected function stream(string $view, array $parameters = [], ?StreamedResponse $response = null): StreamedResponse
|
||||
{
|
||||
if (!$this->container->has('twig')) {
|
||||
throw new \LogicException('You cannot use the "stream" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
|
||||
@@ -309,7 +309,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
|
||||
*
|
||||
* throw $this->createNotFoundException('Page not found!');
|
||||
*/
|
||||
protected function createNotFoundException(string $message = 'Not Found', \Throwable $previous = null): NotFoundHttpException
|
||||
protected function createNotFoundException(string $message = 'Not Found', ?\Throwable $previous = null): NotFoundHttpException
|
||||
{
|
||||
return new NotFoundHttpException($message, $previous);
|
||||
}
|
||||
@@ -323,7 +323,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
|
||||
*
|
||||
* @throws \LogicException If the Security component is not available
|
||||
*/
|
||||
protected function createAccessDeniedException(string $message = 'Access Denied.', \Throwable $previous = null): AccessDeniedException
|
||||
protected function createAccessDeniedException(string $message = 'Access Denied.', ?\Throwable $previous = null): AccessDeniedException
|
||||
{
|
||||
if (!class_exists(AccessDeniedException::class)) {
|
||||
throw new \LogicException('You cannot use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle".');
|
||||
@@ -406,7 +406,7 @@ abstract class AbstractController implements ServiceSubscriberInterface
|
||||
/**
|
||||
* @param LinkInterface[] $links
|
||||
*/
|
||||
protected function sendEarlyHints(iterable $links = [], Response $response = null): Response
|
||||
protected function sendEarlyHints(iterable $links = [], ?Response $response = null): Response
|
||||
{
|
||||
if (!$this->container->has('web_link.http_header_serializer')) {
|
||||
throw new \LogicException('You cannot use the "sendEarlyHints" method if the WebLink component is not available. Try running "composer require symfony/web-link".');
|
||||
|
||||
Reference in New Issue
Block a user