I have a python app that works with URL lists and produces bash script as an output.
How to sanitize URL so that a malicious user could not inject bash commands that will be executed on my infrastructure.
For instance:
http://www.circl.lu/a.php?rm -Rf /etc
printf '%s\n' "$UNSANITIZED_URL"is completely safe. (Assuming no buffer-overflow bugs or the like in your shell itself.)