fix
This commit is contained in:
parent
503c40cad3
commit
037bc45467
|
@ -416,11 +416,11 @@ fi
|
||||||
BODY_CONTAINS=" "
|
BODY_CONTAINS=" "
|
||||||
if [ -n "$CRIT_STRING" ]; then
|
if [ -n "$CRIT_STRING" ]; then
|
||||||
BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE $HEADERS $RESOLVE $TIMEOUT $URL)
|
BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE $HEADERS $RESOLVE $TIMEOUT $URL)
|
||||||
if $SANITIZE_HTML; then
|
|
||||||
BODY=$(echo "$BODY" | sed 's/</\</g' | sed 's/>/\>/g')
|
|
||||||
fi
|
|
||||||
# shellcheck disable=SC2076
|
# shellcheck disable=SC2076
|
||||||
if ! [[ $BODY =~ "$CRIT_STRING" ]]; then
|
if ! [[ $BODY =~ "$CRIT_STRING" ]]; then
|
||||||
|
if $SANITIZE_HTML; then
|
||||||
|
BODY=$(echo "$BODY" | sed 's/</\</g' | sed 's/>/\>/g')
|
||||||
|
fi
|
||||||
echo "CRITICAL - response body does not contain the required string: $BODY"
|
echo "CRITICAL - response body does not contain the required string: $BODY"
|
||||||
exit 2
|
exit 2
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue