Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-05-28 05:25:10 +0400
committermattab <matthieu.aubry@gmail.com>2014-05-28 05:25:10 +0400
commitc4785eea53b15ed9c0e55bf895af01e8e7612382 (patch)
tree66b19fc382b71e8b9586aebfad79b601c81f3cc7
parent10eaf628195ca13ac299bb13291ad01f043973a3 (diff)
Move checks to function body to make calling them easier and safer2.4.0-b2
-rw-r--r--plugins/Installation/ServerFilesGenerator.php7
-rw-r--r--plugins/Installation/SystemCheck.php8
m---------tests/PHPUnit/UI0
3 files changed, 9 insertions, 6 deletions
diff --git a/plugins/Installation/ServerFilesGenerator.php b/plugins/Installation/ServerFilesGenerator.php
index aa87042318..255cea6314 100644
--- a/plugins/Installation/ServerFilesGenerator.php
+++ b/plugins/Installation/ServerFilesGenerator.php
@@ -18,6 +18,9 @@ class ServerFilesGenerator
*/
public static function createHtAccessFiles()
{
+ if(!SettingsServer::isApache()) {
+ return;
+ }
$denyAll = self::getDenyAllHtaccessContent();
$allow = self::getAllowHtaccessContent();
@@ -81,7 +84,6 @@ class ServerFilesGenerator
}
}
-
/**
* Generate IIS web.config files to restrict access
*
@@ -89,6 +91,9 @@ class ServerFilesGenerator
*/
public static function createWebConfigFiles()
{
+ if (!SettingsServer::isIIS()) {
+ return;
+ }
@file_put_contents(PIWIK_INCLUDE_PATH . '/web.config',
'<?xml version="1.0" encoding="UTF-8"?>
<configuration>
diff --git a/plugins/Installation/SystemCheck.php b/plugins/Installation/SystemCheck.php
index a387990bc2..489d7995e7 100644
--- a/plugins/Installation/SystemCheck.php
+++ b/plugins/Installation/SystemCheck.php
@@ -309,11 +309,9 @@ class SystemCheck
protected static function initServerFilesForSecurity()
{
- if (SettingsServer::isIIS()) {
- ServerFilesGenerator::createWebConfigFiles();
- } else {
- ServerFilesGenerator::createHtAccessFiles();
- }
+ ServerFilesGenerator::createWebConfigFiles();
+ ServerFilesGenerator::createHtAccessFiles();
+
ServerFilesGenerator::createWebRootFiles();
}
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
-Subproject 15e1892a561bf7c669d0303e13185860b857a29
+Subproject 7d580d90b3cddb799aae46ca003243da83b1701