Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  [WebProfilerBundle][TwigBundle] Add conflicts with 7.0
  Check whether secrets are empty and mark them all as sensitive
  [HttpKernel] Add `ControllerResolver::allowControllers()` to define which callables are legit controllers when the `_check_controller_is_allowed` request attribute is set
  • Loading branch information
nicolas-grekas committed Nov 7, 2023
2 parents 05d4e68 + e0905cd commit 47d7232
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions UriSigner.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
namespace Symfony\Component\HttpFoundation;

/**
* Signs URIs.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
class UriSigner
Expand All @@ -22,11 +20,14 @@ class UriSigner
private string $parameter;

/**
* @param string $secret A secret
* @param string $parameter Query string parameter to use
*/
public function __construct(#[\SensitiveParameter] string $secret, string $parameter = '_hash')
{
if (!$secret) {
throw new \InvalidArgumentException('A non-empty secret is required.');
}

$this->secret = $secret;
$this->parameter = $parameter;
}
Expand Down

0 comments on commit 47d7232

Please sign in to comment.