From b9c5f94589a19748381c9eeacc4ea2ffd1691e1f Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 23 Jan 2019 10:24:56 +0100 Subject: [PATCH] IcingaConfigHelper: add missing reserved keywords fixes #1765 --- doc/82-Changelog.md | 2 +- .../Director/IcingaConfig/IcingaConfigHelper.php | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index 08ba3ba8..c6a33eae 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -13,7 +13,7 @@ before switching to a new version. ### User Interface * FIX: restoring a basket fails when there is only one configured DB (#1716) * FIX: creating a new Basket with a "Custom Selection" failed with an error (#1733) - +* FIX: some new reserved keywords are now escaped correctly (#1765) 1.6.0 ----- diff --git a/library/Director/IcingaConfig/IcingaConfigHelper.php b/library/Director/IcingaConfig/IcingaConfigHelper.php index 61da6f32..40ea5862 100644 --- a/library/Director/IcingaConfig/IcingaConfigHelper.php +++ b/library/Director/IcingaConfig/IcingaConfigHelper.php @@ -8,7 +8,7 @@ class IcingaConfigHelper { /** * Reserved words according to - * https://docs.icinga.com/icinga2/snapshot/doc/module/icinga2/chapter/language-reference#reserved-keywords + * https://icinga.com/docs/icinga2/latest/doc/17-language-reference/#reserved-keywords */ protected static $reservedWords = [ 'object', @@ -38,6 +38,18 @@ class IcingaConfigHelper 'in', 'current_filename', 'current_line', + 'include_zones', + 'globals', + 'locals', + 'default', + 'break', + 'continue', + 'while', + 'throw', + 'try', + 'except', + 'using', + 'namespace', ]; public static function renderKeyValue($key, $value, $prefix = ' ')