From 781282599c1b80b7aeac312a6861719c1868f01a Mon Sep 17 00:00:00 2001 From: wh1te909 <7434746+wh1te909@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:08:39 +0000 Subject: [PATCH] more webhook json fixes --- api/tacticalrmm/core/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/tacticalrmm/core/utils.py b/api/tacticalrmm/core/utils.py index 14bda469..4bc1e017 100644 --- a/api/tacticalrmm/core/utils.py +++ b/api/tacticalrmm/core/utils.py @@ -238,6 +238,9 @@ def _run_url_rest_action(*, url: str, method, body: str, headers: str, instance= new_headers = find_and_replace_db_values_str(text=headers, instance=instance) new_url = requote_uri(new_url) + # usually for stderr fields that contain windows file paths, like {{alert.get_result.stderr}} + new_body = new_body.replace("\\", "\\\\") + try: new_body = json.loads(new_body, strict=False) except Exception as e: