diff --git a/application/menunode.class.inc.php b/application/menunode.class.inc.php index 0071b5532f..09def76908 100644 --- a/application/menunode.class.inc.php +++ b/application/menunode.class.inc.php @@ -1546,7 +1546,16 @@ class ShortcutMenuNode extends MenuNode public function GetHyperlink($aExtraParams) { $sContext = $this->oShortcut->Get('context'); - $aContext = unserialize($sContext); + try { + $aContext = utils::Unserialize($sContext, ['allowed_classes' => false]); + } catch (Exception $e) { + IssueLog::Warning("User shortcut corrupted, delete the shortcut", LogChannels::CONSOLE, [ + 'shortcut_name' => $this->oShortcut->GetName(), + 'root_cause' => $e->getMessage(), + ]); + // delete the shortcut + $this->oShortcut->DBDelete(); + } if (isset($aContext['menu'])) { unset($aContext['menu']); }