diff --git a/web-apache-mysql/alpine/conf/etc/zabbix/web/maintenance.inc.php b/web-apache-mysql/alpine/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-apache-mysql/alpine/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-apache-mysql/alpine/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php b/web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-apache-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-apache-mysql/centos/conf/etc/zabbix/web/maintenance.inc.php b/web-apache-mysql/centos/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-apache-mysql/centos/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-apache-mysql/centos/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php b/web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-apache-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-apache-mysql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php b/web-apache-mysql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-apache-mysql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-apache-mysql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php b/web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-apache-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-apache-pgsql/alpine/conf/etc/zabbix/web/maintenance.inc.php b/web-apache-pgsql/alpine/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-apache-pgsql/alpine/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-apache-pgsql/alpine/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php b/web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-apache-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-apache-pgsql/centos/conf/etc/zabbix/web/maintenance.inc.php b/web-apache-pgsql/centos/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-apache-pgsql/centos/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-apache-pgsql/centos/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php b/web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-apache-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php b/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php b/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-apache-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-nginx-mysql/alpine/conf/etc/zabbix/web/maintenance.inc.php b/web-nginx-mysql/alpine/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-nginx-mysql/alpine/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-nginx-mysql/alpine/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php b/web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-nginx-mysql/alpine/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-nginx-mysql/centos/conf/etc/zabbix/web/maintenance.inc.php b/web-nginx-mysql/centos/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-nginx-mysql/centos/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-nginx-mysql/centos/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php b/web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-nginx-mysql/centos/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-nginx-mysql/rhel/conf/etc/zabbix/web/maintenance.inc.php b/web-nginx-mysql/rhel/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-nginx-mysql/rhel/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-nginx-mysql/rhel/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php b/web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-nginx-mysql/rhel/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php b/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php b/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-nginx-mysql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-nginx-pgsql/alpine/conf/etc/zabbix/web/maintenance.inc.php b/web-nginx-pgsql/alpine/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-nginx-pgsql/alpine/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-nginx-pgsql/alpine/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php b/web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-nginx-pgsql/alpine/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-nginx-pgsql/centos/conf/etc/zabbix/web/maintenance.inc.php b/web-nginx-pgsql/centos/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-nginx-pgsql/centos/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-nginx-pgsql/centos/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php b/web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-nginx-pgsql/centos/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php b/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php +++ b/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php b/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php +++ b/web-nginx-pgsql/ubuntu/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array(); diff --git a/zabbix-appliance/rhel/conf/etc/zabbix/web/maintenance.inc.php b/zabbix-appliance/rhel/conf/etc/zabbix/web/maintenance.inc.php index 4bd4791e0..5f0e61e85 100644 --- a/zabbix-appliance/rhel/conf/etc/zabbix/web/maintenance.inc.php +++ b/zabbix-appliance/rhel/conf/etc/zabbix/web/maintenance.inc.php @@ -25,7 +25,7 @@ if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') { // IP range, who are allowed to connect to FrontEnd $ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE')); - $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array(); + $ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range, true) : array(); // MSG shown on Warning screen! $_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG'); diff --git a/zabbix-appliance/rhel/conf/etc/zabbix/web/zabbix.conf.php b/zabbix-appliance/rhel/conf/etc/zabbix/web/zabbix.conf.php index 920b8ab1c..cd83f4b59 100644 --- a/zabbix-appliance/rhel/conf/etc/zabbix/web/zabbix.conf.php +++ b/zabbix-appliance/rhel/conf/etc/zabbix/web/zabbix.conf.php @@ -34,17 +34,17 @@ $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; // Elasticsearch url (can be string if same url is used for all types). $history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL')); -$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url) : $history_url; +$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url; // Value types stored in Elasticsearch. $storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES')); -$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types) : array(); +$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array(); // Used for SAML authentication. // Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. -$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : ''; -$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : ''; -$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : ''; +$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : ''); +$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : ''); +$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : ''); $sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS')); -$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings) : array(); +$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();