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

web interface allows to run arbitrary commands on host #11

Open
carandraug opened this issue Jul 2, 2016 · 7 comments
Open

web interface allows to run arbitrary commands on host #11

carandraug opened this issue Jul 2, 2016 · 7 comments

Comments

@carandraug
Copy link
Contributor

  1. it uses backticks instead of system() with a list of arguments in order to collect output
  2. it uses the same filenames as the ones uploaded (I'm guessing it makes more sense to interpret)
  3. only removes slashes from the filename

The above means that a file named foo $(do something bad).xls will do something bad. Limited to what the user that runs the cgi script can do.

@darogan
Copy link
Owner

darogan commented Jul 4, 2016

Would IPC::Open2 solve this too #12 ?

@carandraug
Copy link
Contributor Author

It can solve the problem. You will need to call it avoiding the shell (by passing a list of arguments instead of a command string) as you would when using system. I believe this only works reliably on Unix systems though --- in Windows the arguments often end up being concatenated anyway (which is not an issue since the web interface already does not work in Windows).

@carandraug
Copy link
Contributor Author

Are you still planning on fixing this?

@darogan
Copy link
Owner

darogan commented Sep 8, 2016

Yes, but I'm pretty snowed under at the moment. Would be a week or two at the earliest.

@carandraug
Copy link
Contributor Author

That's ok., we are in no hurry. We can use it internally in the mean time.

@carandraug
Copy link
Contributor Author

ping

@darogan
Copy link
Owner

darogan commented Nov 3, 2017

@carandraug I have set up a managed web service (with advanced monitoring and quarantine facilities) server here at the University of Cambridge to host particlestats. The new url will be http://particlestats.trophoblast.cam.ac.uk but will be a week or so before I can set up ParticleStats to run there.

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

No branches or pull requests

2 participants