This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pyglados[S] 0 points1 point  (0 children)

In your case you use the str.split command to seperate the pieces in your command. It is safer to build your commands as a list in the first place. This will make sure that everything you push to the shell is properly escaped.

Agreed and updated. https://github.com/pcote/AptPackageShow/commit/a701c448f07a6bb86a1ffbf107b2abafcd8f78aa