Skip to content

Commit 1306935

Browse files
committed
Normalize signed ESI URLs
1 parent bc6fb5f commit 1306935

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/signing/UrlSigner.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
use HttpMessageSignatures\Url\UrlSigningConfig;
1111
use HttpMessageSignatures\Url\UrlVerifier as HttpUrlVerifier;
1212
use League\Uri\Components\Query;
13+
use League\Uri\Exceptions\SyntaxError;
1314
use League\Uri\Modifier;
1415
use League\Uri\UriString;
15-
use Throwable;
1616

1717
class UrlSigner
1818
{
@@ -33,8 +33,8 @@ public function verify(string $url): bool
3333
{
3434
try {
3535
$normalizedUrl = $this->normalizeUrlForSigning($url);
36-
} catch (Throwable $e) {
37-
Craft::info([
36+
} catch (SyntaxError $e) {
37+
Craft::warning([
3838
'message' => 'Invalid URL signature',
3939
'reason' => sprintf('URL could not be normalized: %s', $e->getMessage()),
4040
'url' => $url,

0 commit comments

Comments
 (0)