diff --git a/library/Director/IcingaConfig/IcingaConfig.php b/library/Director/IcingaConfig/IcingaConfig.php index c584129a..da42ac07 100644 --- a/library/Director/IcingaConfig/IcingaConfig.php +++ b/library/Director/IcingaConfig/IcingaConfig.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Director\IcingaConfig; use Icinga\Application\Benchmark; use Icinga\Application\Hook; +use Icinga\Exception\IcingaException; use Icinga\Exception\ProgrammingError; use Icinga\Module\Director\Db; use Icinga\Module\Director\Util; @@ -319,6 +320,13 @@ class IcingaConfig ini_set('memory_limit', '768M'); ini_set('max_execution_time', 0); + if ($this->db->quote("1\0") !== '\'1\\0\'') { + throw new IcingaException( + 'Refusing to render the configuration, your DB layer corrupts binary data.' + . ' You might be affected by Zend Framework bug #655' + ); + } + $this->configFile( sprintf( 'zones.d/%s/001-director-basics',