From d3e7bce8b133c179bf769c46be972c0702d392fb Mon Sep 17 00:00:00 2001 From: Yona Cohen Date: Thu, 20 Jul 2023 00:14:57 -0700 Subject: [PATCH] Input check for timeout in generate_dump --- scripts/generate_dump | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/generate_dump b/scripts/generate_dump index 36ff8a1e7b..12ca39bdbd 100755 --- a/scripts/generate_dump +++ b/scripts/generate_dump @@ -2020,6 +2020,10 @@ while getopts ":xnvhzas:t:r:d" opt; do date --date="${SINCE_DATE}" &> /dev/null || abort "${EXT_INVALID_ARGUMENT}" "Invalid date expression passed: '${SINCE_DATE}'" ;; t) + if ! [[ ${OPTARG} =~ ^[0-9]+$ ]]; then + echo "Invalid timeout value: ${OPTARG}, Please enter a numeric value." + exit $EXT_GENERAL + fi TIMEOUT_MIN="${OPTARG}" ;; r)