File: 0015-Do-not-allow-Internet-use-or-auto-updates.patch

package info (click to toggle)
matomo 5.5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 73,596 kB
  • sloc: php: 231,041; javascript: 102,286; python: 202; xml: 189; sh: 172; makefile: 20; sql: 10
file content (49 lines) | stat: -rw-r--r-- 1,637 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 15 Dec 2024 23:26:02 +0100
Subject: Do not allow Internet use or auto updates

Origin: vendor
Forwarded: not-needed
---
 core/SettingsPiwik.php          | 6 ++++++
 plugins/CoreUpdater/Updater.php | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php
index a6ce4b3..717a1a2 100644
--- a/core/SettingsPiwik.php
+++ b/core/SettingsPiwik.php
@@ -261,6 +261,9 @@ class SettingsPiwik
      */
     public static function isInternetEnabled(): bool
     {
+        // Debian is the only way to update and install plugins
+        return false;
+
         return (bool) Config::getInstance()->General['enable_internet_features'];
     }
 
@@ -272,6 +275,9 @@ class SettingsPiwik
      */
     public static function isAutoUpdateEnabled(): bool
     {
+        // Debian is the only way to update
+        return false;
+
         $enableAutoUpdate = (bool) Config::getInstance()->General['enable_auto_update'];
         if (self::isInternetEnabled() === true && $enableAutoUpdate === true) {
             return true;
diff --git a/plugins/CoreUpdater/Updater.php b/plugins/CoreUpdater/Updater.php
index a54f632..38ccf0a 100644
--- a/plugins/CoreUpdater/Updater.php
+++ b/plugins/CoreUpdater/Updater.php
@@ -72,6 +72,9 @@ class Updater
      */
     public function isNewVersionAvailable()
     {
+        // Debian is the only way to update and check for updates
+        return false;
+
         $latestVersion = self::getLatestVersion();
         return $latestVersion && version_compare(Version::VERSION, $latestVersion) === -1;
     }