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)
|
||||||
|
# shellcheck disable=SC2076
|
||||||
|
if ! [[ $BODY =~ "$CRIT_STRING" ]]; then
|
||||||
if $SANITIZE_HTML; then
|
if $SANITIZE_HTML; then
|
||||||
BODY=$(echo "$BODY" | sed 's/</\</g' | sed 's/>/\>/g')
|
BODY=$(echo "$BODY" | sed 's/</\</g' | sed 's/>/\>/g')
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC2076
|
|
||||||
if ! [[ $BODY =~ "$CRIT_STRING" ]]; then
|
|
||||||
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