Skip to content

Protection against too long command to avoid bad code injection in shell #9

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jdespatis
Copy link
Contributor

It's possible to invoke ezscriptmonitor with a big big command line, but if the command is longer than 2000, it will be silently cut by the database (length for this command has been increased from 255 to 2000 with #8, but whatever the limit is, even huge, protection is required)

When the cronjob executes this command, it will execute a command, that has been cut just after 2000 chars...

So with a command like "./prog --command='echo "[massive spaces]"; rm -rf /' --scriptid=4"...
Well... you know... :)

@glye
Copy link
Member

glye commented Dec 2, 2011

Very good!

@jdespatis
Copy link
Contributor Author

@andrerom Tell us if you think some elements are missing for making this pull request merged (and indeed the other 2 ones for ezscriptmonitor), so that I can add them

@andrerom
Copy link
Contributor

Why do you call on me in this one, I'm not even part of the discussion here :)

@ghost ghost assigned glye Jan 30, 2012
@jdespatis
Copy link
Contributor Author

@andrerom oups sorry, as you were involved in another pull request for ezscriptmonitor, I thought you were the one that could merge the pull request :)

@glye have you the authority to merge all the pull requests for ezscriptmonitor ? if yes, tell me if some elements are missing for those pull so that I can correct them

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

Successfully merging this pull request may close these issues.

3 participants