Skip to content

Commit

Permalink
Merge pull request #3034 from MTES-MCT/bugfix/3010-fix-show-uploaded-…
Browse files Browse the repository at this point in the history
…file-not-found

[QA - sentry] NotFoundHttpException sur les exports pdf des signalements
  • Loading branch information
hmeneuvrier committed Sep 16, 2024
2 parents fa56adf + b9aa732 commit 55eabdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Security/SecurityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function showUploadedFile(
$request = Request::createFromGlobals();

if (!$this->isCsrfTokenValid('suivi_signalement_ext_file_view', $request->get('t')) && !$this->isGranted('SIGN_VIEW', $signalement)) {
throw $this->createNotFoundException();
throw $this->createAccessDeniedException();
}
try {
$variant = $request->query->get('variant');
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Controller/SecurityControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public function testShowUploadedWithInvalidToken(): void
$client = static::createClient();
$client->request('GET', '/_up/check.png');

$this->assertResponseStatusCodeSame(404);
$this->assertResponseRedirects('/connexion');
}
}

0 comments on commit 55eabdc

Please sign in to comment.