diff --git a/ToolboxStack/output/toolbox-template/run.sh b/ToolboxStack/output/toolbox-template/run.sh index 5fbb352..c7d5a54 100755 --- a/ToolboxStack/output/toolbox-template/run.sh +++ b/ToolboxStack/output/toolbox-template/run.sh @@ -6,10 +6,12 @@ set -euo pipefail sanitized_input() { local input="$1" # Check for potentially dangerous characters/commands - if [[ "$input" =~ [;\|&\`\$] ]]; then - echo "Error: Invalid input detected: $input" >&2 - exit 1 - fi + case "$input" in + *[\;\|\&\`\$]*) + echo "Error: Invalid input detected: $input" >&2 + exit 1 + ;; + esac } # Validate dependencies