-
Incident report
-
Resolution: Fixed
-
Trivial
-
2.2.6, 2.4.2
-
Zabbix 2.2.6 and 2.4.2, extracted from sources.
Documentation describes we need to set to 1 the parameter ZBX_DENY_GUI_ACCESS, but setting it to whatever still enables the maintenance mode.
Parameter Details
ZBX_DENY_GUI_ACCESS Enable maintenance mode:
1 – maintenance mode is enabled, disabled otherwise
A quick patch (2.4.2) to this goes below:
--- include/classes/core/ZBase.php.orig 2014-12-12 14:56:17.000000000 -0200 +++ include/classes/core/ZBase.php 2014-12-12 14:56:45.000000000 -0200 @@ -291,7 +291,7 @@ protected function setMaintenanceMode() { require_once $this->getRootDir().'/conf/maintenance.inc.php'; - if (defined('ZBX_DENY_GUI_ACCESS')) { + if (defined('ZBX_DENY_GUI_ACCESS') and (ZBX_DENY_GUI_ACCESS == 1) ) { $user_ip = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];