X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/c9c4dbcb5b30e5e39961ceeb031c18ddfaa165e5..refs/pull/3693/head:/app/Http/Controllers/Images/ImageController.php diff --git a/app/Http/Controllers/Images/ImageController.php b/app/Http/Controllers/Images/ImageController.php index 231712d52..b5bc840a1 100644 --- a/app/Http/Controllers/Images/ImageController.php +++ b/app/Http/Controllers/Images/ImageController.php @@ -33,7 +33,7 @@ class ImageController extends Controller */ public function showImage(string $path) { - if (!$this->imageService->pathExistsInLocalSecure($path)) { + if (!$this->imageService->pathAccessibleInLocalSecure($path)) { throw (new NotFoundException(trans('errors.image_not_found'))) ->setSubtitle(trans('errors.image_not_found_subtitle')) ->setDetails(trans('errors.image_not_found_details')); @@ -51,7 +51,7 @@ class ImageController extends Controller public function update(Request $request, string $id) { $this->validate($request, [ - 'name' => 'required|min:2|string', + 'name' => ['required', 'min:2', 'string'], ]); $image = $this->imageRepo->getById($id);