]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Images/ImageController.php
Fixed local_secure_restricted preventing attachment uploads
[bookstack] / app / Http / Controllers / Images / ImageController.php
index 231712d5204eb0795f141c9ffba699178b709365..b5bc840a1c1240af9f5f18e5c51af2feff86834c 100644 (file)
@@ -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);