File: 0016-Enforce-isIIS-false.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 (24 lines) | stat: -rw-r--r-- 777 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
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 15 Dec 2024 23:33:22 +0100
Subject: Enforce isIIS=false

Origin: vendor
Forwarded: not-needed
---
 core/SettingsServer.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/SettingsServer.php b/core/SettingsServer.php
index 80d2f68..b3b82c0 100644
--- a/core/SettingsServer.php
+++ b/core/SettingsServer.php
@@ -76,6 +76,9 @@ class SettingsServer
      */
     public static function isIIS()
     {
+        // Disable the logic that would write files to protect directory index for IIS
+        return false;
+
         $iis = isset($_SERVER['SERVER_SOFTWARE']) &&
             preg_match('/^Microsoft-IIS\/(.+)/', $_SERVER['SERVER_SOFTWARE'], $matches) &&
             version_compare($matches[1], '7') >= 0;