Merge pull request #5647 from Candinya/patch-1

fix: watchdog webhook body variables injector
This commit is contained in:
Niklas Meyer authored and GitHub committed 2024-01-22 10:34:06 +01:00
commit 68989f0a45
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -170,7 +170,7 @@ function notify_error() {
fi
# Replace subject and body placeholders
WEBHOOK_BODY=$(echo ${WATCHDOG_NOTIFY_WEBHOOK_BODY} | sed "s|\$SUBJECT\|\${SUBJECT}|$SUBJECT|g" | sed "s|\$BODY\|\${BODY}|$BODY|")
WEBHOOK_BODY=$(echo ${WATCHDOG_NOTIFY_WEBHOOK_BODY} | sed "s/\$SUBJECT\|\${SUBJECT}/$SUBJECT/g" | sed "s/\$BODY\|\${BODY}/$BODY/g")
# POST to webhook
curl -X POST -H "Content-Type: application/json" ${CURL_VERBOSE} -d "${WEBHOOK_BODY}" ${WATCHDOG_NOTIFY_WEBHOOK}