This commit is contained in:
Cyberes 2024-03-30 20:28:59 -06:00
parent 503c40cad3
commit 037bc45467
1 changed files with 3 additions and 3 deletions

View File

@ -416,11 +416,11 @@ fi
BODY_CONTAINS=" "
if [ -n "$CRIT_STRING" ]; then
BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE $HEADERS $RESOLVE $TIMEOUT $URL)
if $SANITIZE_HTML; then
BODY=$(echo "$BODY" | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g')
fi
# shellcheck disable=SC2076
if ! [[ $BODY =~ "$CRIT_STRING" ]]; then
if $SANITIZE_HTML; then
BODY=$(echo "$BODY" | sed 's/</\&lt;/g' | sed 's/>/\&gt;/g')
fi
echo "CRITICAL - response body does not contain the required string: $BODY"
exit 2
else