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
path: root/config
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2020-10-01 23:12:31 +0300
committerGitHub <noreply@github.com>2020-10-01 23:12:31 +0300
commit82186597b37e255a5b13f6b9c7e53d323b2c501b (patch)
tree5f30ed30c5cd63d6451280e7a6b8081245be6316 /config
parent13cda22af49f616d1e5967364a041215f864d0c5 (diff)
Rename login_whitelist_ip config to login_allowlist_ip (#16413)
Diffstat (limited to 'config')
-rwxr-xr-xconfig/global.ini.php24
-rw-r--r--config/global.php7
2 files changed, 17 insertions, 14 deletions
diff --git a/config/global.ini.php b/config/global.ini.php
index fdba741a40..568c5910a5 100755
--- a/config/global.ini.php
+++ b/config/global.ini.php
@@ -426,22 +426,22 @@ login_password_recovery_replyto_email_name = "No-reply"
; When configured, only users from a configured IP can log into your Matomo. You can define one or multiple
; IPv4, IPv6, and IP ranges. You may also define hostnames. However, resolving hostnames in each request
; may slightly slow down your Matomo.
-; This whitelist also affects API requests unless you disabled it via the setting
-; "login_whitelist_apply_to_reporting_api_requests" below. Note that neither this setting, nor the
-; "login_whitelist_apply_to_reporting_api_requests" restricts authenticated tracking requests (tracking requests
+; This allowlist also affects API requests unless you disabled it via the setting
+; "login_allowlist_apply_to_reporting_api_requests" below. Note that neither this setting, nor the
+; "login_allowlist_apply_to_reporting_api_requests" restricts authenticated tracking requests (tracking requests
; with a "token_auth" URL parameter).
;
; Examples:
-; login_whitelist_ip[] = 204.93.240.*
-; login_whitelist_ip[] = 204.93.177.0/24
-; login_whitelist_ip[] = 199.27.128.0/21
-; login_whitelist_ip[] = 2001:db8::/48
-; login_whitelist_ip[] = matomo.org
-
-; By default, if a whitelisted IP address is specified via "login_whitelist_ip[]", the reporting user interface as
-; well as HTTP Reporting API requests will only work for these whitelisted IPs.
+; login_allowlist_ip[] = 204.93.240.*
+; login_allowlist_ip[] = 204.93.177.0/24
+; login_allowlist_ip[] = 199.27.128.0/21
+; login_allowlist_ip[] = 2001:db8::/48
+; login_allowlist_ip[] = matomo.org
+
+; By default, if an allowlisted IP address is specified via "login_allowlist_ip[]", the reporting user interface as
+; well as HTTP Reporting API requests will only work for these allowlisted IPs.
; Set this setting to "0" to allow HTTP Reporting API requests from any IP address.
-login_whitelist_apply_to_reporting_api_requests = 1
+login_allowlist_apply_to_reporting_api_requests = 1
; By default when user logs out they are redirected to Matomo "homepage" usually the Login form.
; Uncomment the next line to set a URL to redirect the user to after they log out of Matomo.
diff --git a/config/global.php b/config/global.php
index bd51022f7f..3d3f9c195f 100644
--- a/config/global.php
+++ b/config/global.php
@@ -146,13 +146,16 @@ return array(
'Piwik\EventDispatcher' => DI\autowire()->constructorParameter('observers', DI\get('observers.global')),
- 'login.whitelist.ips' => function (ContainerInterface $c) {
+ 'login.allowlist.ips' => function (ContainerInterface $c) {
/** @var Piwik\Config\ $config */
$config = $c->get('Piwik\Config');
$general = $config->General;
$ips = array();
- if (!empty($general['login_whitelist_ip']) && is_array($general['login_whitelist_ip'])) {
+ if (!empty($general['login_allowlist_ip']) && is_array($general['login_allowlist_ip'])) {
+ $ips = $general['login_allowlist_ip'];
+ } elseif (!empty($general['login_whitelist_ip']) && is_array($general['login_whitelist_ip'])) {
+ // for BC
$ips = $general['login_whitelist_ip'];
}