mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-03 16:23:35 +08:00
Fixed issue where books titles could be leaked via shelf home view
- Also added test to cover Fixes #1425
This commit is contained in:
@ -67,6 +67,9 @@ class HomeController extends Controller
|
||||
|
||||
if ($homepageOption === 'bookshelves') {
|
||||
$shelves = $this->entityRepo->getAllPaginated('bookshelf', 18, $commonData['sort'], $commonData['order']);
|
||||
foreach ($shelves as $shelf) {
|
||||
$shelf->books = $this->entityRepo->getBookshelfChildren($shelf);
|
||||
}
|
||||
$data = array_merge($commonData, ['shelves' => $shelves]);
|
||||
return view('common.home-shelves', $data);
|
||||
}
|
||||
|
Reference in New Issue
Block a user