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:
authormattpiwik <matthieu.aubry@gmail.com>2009-12-14 12:00:53 +0300
committermattpiwik <matthieu.aubry@gmail.com>2009-12-14 12:00:53 +0300
commitb08ae20ce7f472e6427222a0108b12636e1ea098 (patch)
tree98e6b06548bba1bf65d2dbe8af72d8828ff44b0c /plugins/SecurityInfo/PhpSecInfo
parent90b8c3f249c83ed414b7fbdca4a9dd244a970472 (diff)
Removing PHP security information not relevant to a Piwik-only php server.
git-svn-id: http://dev.piwik.org/svn/trunk@1686 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/SecurityInfo/PhpSecInfo')
-rw-r--r--plugins/SecurityInfo/PhpSecInfo/Test/Core/post_max_size.php71
-rw-r--r--plugins/SecurityInfo/PhpSecInfo/Test/Core/safe_mode.php77
-rw-r--r--plugins/SecurityInfo/PhpSecInfo/Test/Core/upload_max_filesize.php70
3 files changed, 0 insertions, 218 deletions
diff --git a/plugins/SecurityInfo/PhpSecInfo/Test/Core/post_max_size.php b/plugins/SecurityInfo/PhpSecInfo/Test/Core/post_max_size.php
deleted file mode 100644
index 09bd2474ec..0000000000
--- a/plugins/SecurityInfo/PhpSecInfo/Test/Core/post_max_size.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * Test Class for post_max_size
- *
- * @package PhpSecInfo
- * @author Ed Finkler <coj@funkatron.com>
- */
-
-
-/**
- * require the PhpSecInfo_Test_Core class
- */
-require_once(PHPSECINFO_BASE_DIR.'/Test/Test_Core.php');
-
-/**
- * The max recommended size for the post_max_size setting, in bytes
- *
- */
-define ('PHPSECINFO_POST_MAXLIMIT', 1024*256);
-
-/**
- * Test Class for post_max_size
- *
- * @package PhpSecInfo
- */
-class PhpSecInfo_Test_Core_Post_Max_Size extends PhpSecInfo_Test_Core
-{
-
- /**
- * This should be a <b>unique</b>, human-readable identifier for this test
- *
- * @var string
- */
- var $test_name = "post_max_size";
-
- var $recommended_value = PHPSECINFO_POST_MAXLIMIT;
-
- function _retrieveCurrentValue() {
- $this->current_value = $this->returnBytes(ini_get('post_max_size'));
- }
-
- /**
- * Check to see if the post_max_size setting is enabled.
- */
- function _execTest() {
-
- if ($this->current_value
- && $this->current_value <= $this->recommended_value
- && $post_max_size != -1) {
- return PHPSECINFO_TEST_RESULT_OK;
- }
-
- return PHPSECINFO_TEST_RESULT_NOTICE;
- }
-
-
- /**
- * Set the messages specific to this test
- *
- */
- function _setMessages() {
- parent::_setMessages();
-
- $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'post_max_size is enabled, and appears to
- be a relatively low value');
- $this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', 'post_max_size is not enabled, or is set to
- a high value. Allowing a large value may open up your server to denial-of-service attacks');
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/SecurityInfo/PhpSecInfo/Test/Core/safe_mode.php b/plugins/SecurityInfo/PhpSecInfo/Test/Core/safe_mode.php
deleted file mode 100644
index 0ba828d343..0000000000
--- a/plugins/SecurityInfo/PhpSecInfo/Test/Core/safe_mode.php
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/**
- * Test Class for safe_mode
- *
- * @package PhpSecInfo
- * @author Piwik
- */
-
-
-/**
- * require the PhpSecInfo_Test_Core class
- */
-require_once(PHPSECINFO_BASE_DIR.'/Test/Test_Core.php');
-
-
-/**
- * Test Class for safe_mode
- *
- * @package PhpSecInfo
- */
-class PhpSecInfo_Test_Core_Safe_Mode extends PhpSecInfo_Test_Core
-{
-
- /**
- * This should be a <b>unique</b>, human-readable identifier for this test
- *
- * @var string
- */
- var $test_name = "safe_mode";
-
-
- var $recommended_value = true;
-
-
- function _retrieveCurrentValue() {
- $this->current_value = $this->getBooleanIniValue('safe_mode');
- }
-
-
- /**
- * safe_mode has been removed since PHP 6.0
- *
- * @return boolean
- */
- function isTestable() {
- return version_compare(PHP_VERSION, '6', '<') ;
- }
-
-
-
- /**
- * Checks to see if safe_mode is enabled
- *
- */
- function _execTest() {
- if ($this->current_value == $this->recommended_value) {
- return PHPSECINFO_TEST_RESULT_OK;
- }
-
- return PHPSECINFO_TEST_RESULT_NOTICE;
- }
-
-
- /**
- * Set the messages specific to this test
- *
- */
- function _setMessages() {
- parent::_setMessages();
-
- $this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTRUN, 'en', 'You are running PHP 6 or later and safe_mode has been removed');
- $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'safe_mode is enabled. Your application should not depend on this configuration setting being set because it is deprecated in PHP 5 and removed in PHP 6.');
- $this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', 'safe_mode is disabled. Despite its flaws, enabling safe_mode may offer some additional protection.');
- }
-
-
-}
diff --git a/plugins/SecurityInfo/PhpSecInfo/Test/Core/upload_max_filesize.php b/plugins/SecurityInfo/PhpSecInfo/Test/Core/upload_max_filesize.php
deleted file mode 100644
index bc0b66b42b..0000000000
--- a/plugins/SecurityInfo/PhpSecInfo/Test/Core/upload_max_filesize.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/**
- * Test Class for upload_max_filesize
- *
- * @package PhpSecInfo
- * @author Ed Finkler <coj@funkatron.com>
- */
-
-/**
- * require the PhpSecInfo_Test_Core class
- */
-require_once(PHPSECINFO_BASE_DIR.'/Test/Test_Core.php');
-
-/**
- * The max recommended size for the upload_max_filesize setting, in bytes
- *
- */
-define ('PHPSECINFO_UPLOAD_MAXLIMIT', 1024*256);
-
-
-/**
- * Test Class for upload_max_filesize
- *
- * @package PhpSecInfo
- */
-class PhpSecInfo_Test_Core_Upload_Max_Filesize extends PhpSecInfo_Test_Core
-{
-
-
- /**
- * This should be a <b>unique</b>, human-readable identifier for this test
- *
- * @var string
- */
- var $test_name = "upload_max_filesize";
-
- var $recommended_value = PHPSECINFO_UPLOAD_MAXLIMIT;
-
- function _retrieveCurrentValue() {
- $this->current_value = $this->returnBytes(ini_get('upload_max_filesize'));
- }
-
- /**
- * Check to see if the post_max_size setting is enabled.
- */
- function _execTest() {
-
- if ($this->current_value
- && $this->current_value <= $this->recommended_value
- && $post_max_size != -1) {
- return PHPSECINFO_TEST_RESULT_OK;
- }
-
- return PHPSECINFO_TEST_RESULT_NOTICE;
- }
-
-
- /**
- * Set the messages specific to this test
- *
- */
- function _setMessages() {
- parent::_setMessages();
-
- $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'upload_max_filesize is enabled, and appears to be a relatively low value.');
- $this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', 'upload_max_filesize is not enabled, or is set to a high value. Are you sure your apps require uploading files of this size? If not, lower the limit, as large file uploads can impact server performance');
- }
-
-
-} \ No newline at end of file