Skip to content

Commit b119cac

Browse files
Merge pull request #59303 from nextcloud/bugfix/noid/dont-redirect-on-error
fix(sharing): Don't redirect when accepting a share failed
2 parents 17d60a4 + 2c560b0 commit b119cac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/files_sharing/lib/Controller/AcceptController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function accept(string $shareId): Response {
5151
try {
5252
$share = $this->shareManager->acceptShare($share, $user->getUID());
5353
} catch (\Exception $e) {
54-
// Just ignore
54+
return new NotFoundResponse();
5555
}
5656

5757
$url = $this->urlGenerator->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $share->getNode()->getId()]);

0 commit comments

Comments
 (0)