Skip to content

Commit c03a18a

Browse files
committed
return bad request when jti is invalid
1 parent 3506c69 commit c03a18a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/Routes/SolidStorage.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ public static function respondToStorage() {
3636
$resourceServer->setBaseUrl($baseUrl);
3737
$wac->setBaseUrl($baseUrl);
3838

39-
$webId = StorageServer::getWebId($rawRequest);
39+
try {
40+
$webId = StorageServer::getWebId($rawRequest);
41+
} catch(\Exception $e) {
42+
$response = $resourceServer->getResponse()
43+
-> withStatus(400, "Bad request");
44+
StorageServer::respond($response);
45+
exit();
46+
}
4047

4148
if (!isset($webId)) {
4249
$response = $resourceServer->getResponse()

0 commit comments

Comments
 (0)