From 2896cbd781476b36c9835d2258de883081fc96d2 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 7 Oct 2019 14:35:49 +0200 Subject: [PATCH] loader.js: Avoid named capture groups to parse multipart content fixes #3975 --- public/js/icinga/loader.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/icinga/loader.js b/public/js/icinga/loader.js index 4a51c644c..8cfcfe1f1 100644 --- a/public/js/icinga/loader.js +++ b/public/js/icinga/loader.js @@ -558,15 +558,15 @@ var contentSeparator = req.getResponseHeader('X-Icinga-Multipart-Content'); if (!! contentSeparator) { $.each(req.responseText.split(contentSeparator), function (idx, el) { - var match = el.match(/for=(?\S+)\s+(?.*)/m); + var match = el.match(/for=(\S+)\s+(.*)/m); if (!! match) { - var $target = $('#' + match.groups.id); + var $target = $('#' + match[1]); if ($target.length) { _this.renderContentToContainer( - match.groups.html, $target, 'replace', req.autorefresh, req.forceFocus, autoSubmit); + match[2], $target, 'replace', req.autorefresh, req.forceFocus, autoSubmit); } else { _this.icinga.logger.warn( - 'Invalid target ID. Cannot render multipart to #' + match.groups.id); + 'Invalid target ID. Cannot render multipart to #' + match[1]); } } else { _this.icinga.logger.error('Ill-formed multipart', el);