Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 576dd17

Browse files
committed
add UnSignedUriException
1 parent 8ac352c commit 576dd17

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\HttpFoundation\Exception;
13+
14+
/**
15+
* @author Kevin Bond <[email protected]>
16+
*/
17+
final class UnSignedUriException extends SignedUriException
18+
{
19+
}

src/Symfony/Component/HttpFoundation/UriSigner.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Component\HttpFoundation\Exception\ExpiredSignedUriException;
1515
use Symfony\Component\HttpFoundation\Exception\LogicException;
1616
use Symfony\Component\HttpFoundation\Exception\SignedUriException;
17+
use Symfony\Component\HttpFoundation\Exception\UnSignedUriException;
1718
use Symfony\Component\HttpFoundation\Exception\UnverifiedSignedUriException;
1819

1920
/**
@@ -134,7 +135,8 @@ public function checkRequest(Request $request): bool
134135
/**
135136
* Verify a Request/string URI and return a SignedUri object.
136137
*
137-
* @throws UnverifiedSignedUriException If the URI is not signed or the signature is invalid
138+
* @throws UnSignedUriException If the URI is not signed
139+
* @throws UnverifiedSignedUriException If the signature is invalid
138140
* @throws ExpiredSignedUriException If the URI has expired
139141
* @throws SignedUriException
140142
*/
@@ -153,7 +155,7 @@ public function verify(Request|string $uri): SignedUri
153155
}
154156

155157
if (empty($params[$this->hashParameter])) {
156-
throw new UnverifiedSignedUriException($uri, 'The URI is not signed.');
158+
throw new UnSignedUriException($uri, 'The URI is not signed.');
157159
}
158160

159161
$hash = $params[$this->hashParameter];

0 commit comments

Comments
 (0)