Comment

Comment by craigds

shell=True is a security risk unless you're very careful with escaping inputs. In this case any filename with a `;` in it (or various other shell characters) will run arbitrary commands on the attacker's computer.

best to pass a list of arguments to subprocess rather than a string, and avoid shell=True

parent craigds 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton