Skip to content

Commit

Permalink
Input sanitization for timeout in generate_dump
Browse files Browse the repository at this point in the history
  • Loading branch information
ycoheNvidia committed Jul 24, 2023
1 parent 6716bcf commit 107b4b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/generate_dump
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 107b4b8

Please sign in to comment.