From 8787918547131ae59e1d7ed4356ba23e307f06bb Mon Sep 17 00:00:00 2001 From: Monica-Wood Date: Wed, 30 Apr 2025 07:31:13 +0200 Subject: [PATCH 1/2] Update lib/AppInfo/Application.php The current change is currently filling the nextcloud logs up with the error: `Undefined array key \"HTTP_USER_AGENT\" at /srv/www/nextcloud/apps/side_menu/lib/AppInfo/Application.php#109` This adds a check to ensure the index exists before read it. --- lib/AppInfo/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index c255ae3..f4fceb0 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -106,7 +106,7 @@ class Application extends App implements IBootstrap protected function isEnabled(): bool { - if (preg_match('/MemoriesNative/', $_SERVER['HTTP_USER_AGENT'])) { + if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('/MemoriesNative/', $_SERVER['HTTP_USER_AGENT'])) { return false; } From 8772504b766cf785e527d9e3ceec0f8730e1e2cd Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Wed, 30 Apr 2025 08:41:10 +0200 Subject: [PATCH 2/2] release v5.0.3 --- CHANGELOG.md | 4 ++++ appinfo/info.xml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d49e858..9279c3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +## 5.0.3 +### Fixed +* fix #422: undefined array key "HTTP_USER_AGENT" + ## 5.0.2 ### Fixed * fix #413: add user-agent check for memories mobile app diff --git a/appinfo/info.xml b/appinfo/info.xml index 7fd8755..ad353fd 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -30,7 +30,7 @@ Notice Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**. In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/). ]]> - 5.0.2 + 5.0.3 agpl Simon Vieille SideMenu