Sujet : Sanitise user input for a script
De : simon.n.connah (at) *nospam* protonmail.com (Simon Connah)
Groupes : comp.lang.pythonDate : 30. Aug 2024, 20:18:29
Autres entêtes
Message-ID : <mailman.16.1725045529.2917.python-list@python.org>
References : 1
Pièces jointes : signature.asc (application/pgp-signature) I need to write a script that will take some user input (supplied on a website) and then execute a Python script on a host via SSH. I'm curious what the best options are for protecting against malicious input in much the smae way as you sanitise SQL to protect against SQL injections.
I could do it either on the website itself or by doing it on the host machine.
I'm thinking of using argparse but I'm aware it does not offer any protection itself.
If someone has any suggestions I'd appreciated it. If you need more information then please let me know.
Simon.