From 470ff90cfa4fa50a25e428454465da37aff0aa40 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 21 Aug 2019 14:00:11 +0200 Subject: Bug fix : limit bookmark id length --- app/class/config.php | 5 ++++- app/class/user.php | 7 +++++-- app/view/templates/homemenu.php | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/class/config.php b/app/class/config.php index 5c05657..71ce329 100644 --- a/app/class/config.php +++ b/app/class/config.php @@ -465,8 +465,11 @@ abstract class Config public static function addbookmark(string $id, string $query) { - $id = idclean($id); + if(!empty($id) && !empty($query)) { + $id = idclean($id); + $id = substr($id, 0, 16); self::$bookmark[$id] = $query; + } } public static function deletebookmark(string $id) diff --git a/app/class/user.php b/app/class/user.php index 2b87d62..3f9c19a 100644 --- a/app/class/user.php +++ b/app/class/user.php @@ -276,8 +276,11 @@ class User public function addbookmark(string $id, string $query) { - $id = idclean($id); - $this->bookmark[$id] = $query; + if(!empty($id) && !empty($query)) { + $id = idclean($id); + $id = substr($id, 0, 16); + $this->bookmark[$id] = $query; + } } public function deletebookmark(string $id) diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 46e2308..1003f7d 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -101,7 +101,7 @@ issupereditor()) { ?>
- +
@@ -125,7 +125,7 @@

This will store your filters settings as a Bookmark that only you can use.

- + -- cgit v1.2.3