Skip to content
Extraits de code Groupes Projets
Valider a6fcc10e rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

- configuration files and code setting 0 rather than false and 1 instead of true

git-svn-id: http://dev.piwik.org/svn/trunk@1022 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent d05042b1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
; For example if you override enable_browser_archiving_triggering, ; For example if you override enable_browser_archiving_triggering,
; edit config/config.ini.php and add the following: ; edit config/config.ini.php and add the following:
; [General] ; [General]
; enable_browser_archiving_triggering = false ; enable_browser_archiving_triggering = 0
[superuser] [superuser]
login = root login = root
...@@ -30,13 +30,13 @@ port = 3306 ...@@ -30,13 +30,13 @@ port = 3306
adapter = PDO_MYSQL adapter = PDO_MYSQL
[Debug] [Debug]
; if set to true, the archiving process will always be triggered, even if the archive has already been computed ; if set to 1, the archiving process will always be triggered, even if the archive has already been computed
; this is useful when making changes to the archiving code so we can force the archiving process ; this is useful when making changes to the archiving code so we can force the archiving process
always_archive_data = false always_archive_data = 0
; if set to true, all the SQL queries will be recorded by the profiler ; if set to 1, all the SQL queries will be recorded by the profiler
; and a profiling summary will be printed at the end of the request ; and a profiling summary will be printed at the end of the request
enable_sql_profiler = false enable_sql_profiler = 0
[General] [General]
; Time in seconds after which an archive will be computed again. ; Time in seconds after which an archive will be computed again.
...@@ -52,13 +52,13 @@ default_day = yesterday ...@@ -52,13 +52,13 @@ default_day = yesterday
; You can override the setting to force the user to login. ; You can override the setting to force the user to login.
; This is useful when you have some websites view "anonymous" access but you want to ; This is useful when you have some websites view "anonymous" access but you want to
; force users to login instead of viewing the first anonymous website available ; force users to login instead of viewing the first anonymous website available
default_module_login = false default_module_login = 0
; When loading the piwik interface in the browser (as opposed to from the PHP-CLI client) ; When loading the piwik interface in the browser (as opposed to from the PHP-CLI client)
; should we launch the archiving process if the archives have not yet been processed? ; should we launch the archiving process if the archives have not yet been processed?
; You want to set it to false when triggering the archiving is done through a crontab, ; You want to set it to 0 when triggering the archiving is done through a crontab,
; so that your users do not trigger archiving in their browser when this is not expected ; so that your users do not trigger archiving in their browser when this is not expected
enable_browser_archiving_triggering = true enable_browser_archiving_triggering = 1
; character used to automatically create categories in the "Action" "Downloads" reports ; character used to automatically create categories in the "Action" "Downloads" reports
; for example a URL like "example.com/blog/development/first-post" will create ; for example a URL like "example.com/blog/development/first-post" will create
...@@ -78,10 +78,10 @@ dataTable_default_sort_order = desc ...@@ -78,10 +78,10 @@ dataTable_default_sort_order = desc
; default number of elements in the datatable ; default number of elements in the datatable
dataTable_default_limit = 10 dataTable_default_limit = 10
; if set to true, the website selector will be displayed in the Piwik UI ; if set to 1, the website selector will be displayed in the Piwik UI
; if your Piwik installation has thousands of websites, you may disable the website selector ; if your Piwik installation has thousands of websites, you may disable the website selector
; as it slows down the loading of the Piwik UI by setting this value to false ; as it slows down the loading of the Piwik UI by setting this value to 0
show_website_selector_in_user_interface = true show_website_selector_in_user_interface = 1
; PHP minimum required version (minimum requirement known to date = ->newInstanceArgs) ; PHP minimum required version (minimum requirement known to date = ->newInstanceArgs)
minimum_php_version = 5.1.3 minimum_php_version = 5.1.3
...@@ -129,20 +129,20 @@ visit_standard_length = 1800 ...@@ -129,20 +129,20 @@ visit_standard_length = 1800
; visitors that stay on the website and view only one page will be considered staying 10 seconds ; visitors that stay on the website and view only one page will be considered staying 10 seconds
default_time_one_page_visit = 10 default_time_one_page_visit = 10
; if set to false, any goal conversion will be credited to the last more recent non empty referer. ; if set to 0, any goal conversion will be credited to the last more recent non empty referer.
; when set to true, the first ever referer used to reach the website will be used ; when set to 1, the first ever referer used to reach the website will be used
use_first_referer_to_determine_goal_referer = false use_first_referer_to_determine_goal_referer = 0
; if set to true, Piwik will try to match visitors without cookie to a previous visitor that has the same ; if set to 1, Piwik will try to match visitors without cookie to a previous visitor that has the same
; configuration: OS, browser, resolution, IP, etc. This heuristic adds an extra SQL query for each page view without cookie. ; configuration: OS, browser, resolution, IP, etc. This heuristic adds an extra SQL query for each page view without cookie.
; it is advised to set it to true for more accurate detection of unique visitors. ; it is advised to set it to 1 for more accurate detection of unique visitors.
; However when most users have the same IP, and the same configuration, it is advised to set it to false ; However when most users have the same IP, and the same configuration, it is advised to set it to 0
enable_detect_unique_visitor_using_settings = true enable_detect_unique_visitor_using_settings = 1
; if set to true, Piwik attempts a "best guess" at the visitor's country of ; if set to 1, Piwik attempts a "best guess" at the visitor's country of
; origin when the preferred language tag omits region information. ; origin when the preferred language tag omits region information.
; The mapping is defined in core/DataFiles/LanguageToCountry.php, ; The mapping is defined in core/DataFiles/LanguageToCountry.php,
enable_language_to_country_guess = true enable_language_to_country_guess = 1
; name of the cookie used to store the visitor information ; name of the cookie used to store the visitor information
cookie_name = piwik_visitor cookie_name = piwik_visitor
...@@ -213,7 +213,7 @@ cache_dir = tmp/cache ...@@ -213,7 +213,7 @@ cache_dir = tmp/cache
error_reporting = E_ALL|E_NOTICE error_reporting = E_ALL|E_NOTICE
; allow smarty debugging using {debug} ; allow smarty debugging using {debug}
debugging = true debugging = 1
[Plugins] [Plugins]
......
...@@ -144,12 +144,15 @@ class Piwik_Config ...@@ -144,12 +144,15 @@ class Piwik_Config
else else
{ {
$value = htmlentities($value); $value = htmlentities($value);
$configFile .= $name.' = "'.$value.'"'."\n"; if(!is_numeric($value))
{
$value = "\"$value\"";
}
$configFile .= $name.' = '.$value."\n";
} }
} }
$configFile .= "\n"; $configFile .= "\n";
} }
chdir($this->correctCwd); chdir($this->correctCwd);
file_put_contents($this->getDefaultUserConfigPath(), $configFile ); file_put_contents($this->getDefaultUserConfigPath(), $configFile );
} }
......
...@@ -3,9 +3,10 @@ Manual regression test procedure for XSS referer ...@@ -3,9 +3,10 @@ Manual regression test procedure for XSS referer
1. set in the config.ini.php 1. set in the config.ini.php
[Tracker] [Tracker]
visit_standard_length = 1 visit_standard_length = 1
enable_detect_unique_visitor_using_settings = false enable_detect_unique_visitor_using_settings = 0
[Debug] [Debug]
always_archive_data = true always_archive_data = 1
2. go to /misc/testJavascriptTracker/ and fake the referer using, eg. RefControl options Firefox extension 2. go to /misc/testJavascriptTracker/ and fake the referer using, eg. RefControl options Firefox extension
http://www.google.co.uk/search?hl=en&q=<script>alert('test');</script> http://www.google.co.uk/search?hl=en&q=<script>alert('test');</script>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter