From 60b199854d7fa00947d0bea717fe3a1dfd05efd8 Mon Sep 17 00:00:00 2001 From: Andras Iklody Date: Wed, 4 Sep 2024 07:43:10 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0114d21..1a1ea11 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ For installation via docker, refer to the [cerebrate-docker](https://github.com/ ~~~~ The software is released under the AGPLv3. - Copyright (C) 2019, 2021 Andras Iklody - Copyright (C) 2020-2021 Sami Mokaddem + Copyright (C) 2019-2024 Andras Iklody + Copyright (C) 2020-2024 Sami Mokaddem Copyright (C) CIRCL - Computer Incident Response Center Luxembourg ~~~~ From 8e3e4316fb4e18d2f33df3e59df280d583e84452 Mon Sep 17 00:00:00 2001 From: iglocska Date: Tue, 17 Sep 2024 00:08:49 +0200 Subject: [PATCH 2/2] chg: [bookmarks] Make the rendering more lenient to malformed content - fail gracefully rather than throwing 500s --- src/Controller/Component/NavigationComponent.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Controller/Component/NavigationComponent.php b/src/Controller/Component/NavigationComponent.php index b758b28..b4c4753 100644 --- a/src/Controller/Component/NavigationComponent.php +++ b/src/Controller/Component/NavigationComponent.php @@ -74,8 +74,13 @@ class NavigationComponent extends Component $userSettingTable = TableRegistry::getTableLocator()->get('UserSettings'); $setting = $userSettingTable->getSettingByName($this->request->getAttribute('identity'), 'ui.bookmarks'); $bookmarks = is_null($setting) ? [] : json_decode($setting->value, true); - + if (empty($bookmarks)) { + return []; + } $links = array_map(function($bookmark) { + if (!isset($bookmark['name']) || !isset($bookmark['label']) || !isset($bookmark['url'])) { + return []; + } return [ 'name' => $bookmark['name'], 'label' => $bookmark['label'],