Skip to content

Commit 47d7232

Browse files
Merge branch '6.4' into 7.0
* 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
2 parents 05d4e68 + e0905cd commit 47d7232

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

UriSigner.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
namespace Symfony\Component\HttpFoundation;
1313

1414
/**
15-
* Signs URIs.
16-
*
1715
* @author Fabien Potencier <[email protected]>
1816
*/
1917
class UriSigner
@@ -22,11 +20,14 @@ class UriSigner
2220
private string $parameter;
2321

2422
/**
25-
* @param string $secret A secret
2623
* @param string $parameter Query string parameter to use
2724
*/
2825
public function __construct(#[\SensitiveParameter] string $secret, string $parameter = '_hash')
2926
{
27+
if (!$secret) {
28+
throw new \InvalidArgumentException('A non-empty secret is required.');
29+
}
30+
3031
$this->secret = $secret;
3132
$this->parameter = $parameter;
3233
}

0 commit comments

Comments
 (0)