Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security issue in command invocation #578

Open
GoogleCodeExporter opened this issue Dec 28, 2015 · 0 comments
Open

Security issue in command invocation #578

GoogleCodeExporter opened this issue Dec 28, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

On the stable branch, the use of popen() to run terminal commands constructed 
from user (or freedb) input is a security issue.

From my brief perusal of HEAD, it may also be an issue with PTY.spawn().

The solution I've come up with is to pass commands directly to subprocesses' 
ARGV using popen. The method I've used to split the command line into tokens is 
a total hack, but seems to be functional.

In my mind, a better solution would be to construct commands as an array of 
arguments rather than a string, and pass this array directly to popen (also 
avoiding use of the terminal).

My patch against the stable branch is attached.

Original issue reported on code.google.com by [email protected] on 18 Aug 2013 at 12:54

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant