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

ganglia-logtailer quoting arguments in shelling out to prevent special characters from doing terrible things #35

Merged
merged 4 commits into from
May 12, 2014

Conversation

maplebed
Copy link

@maplebed maplebed commented Apr 7, 2014

unquoted & in something like the metric name will be interpreted by the shell and cause terrible side effects.

@jbuchbinder
Copy link
Member

I'd think that it should be sanitizing the metric names beforehand, rather than passing junk back to the collector. I know that some of that is done already with special characters in some of the C code, but I'd think it would make sense to do the same here.

@maplebed
Copy link
Author

maplebed commented Apr 7, 2014

Do you know what the list of allowed characters is for a metric name? If not, could you point me at where it does this in the C code? I'm not finding it at the moment. :( (still looking though)

@maplebed
Copy link
Author

maplebed commented Apr 8, 2014

(fwiw, gmond seems to handle these random special characters just fine.)

Ben Hartshorne added 2 commits April 7, 2014 17:39
@maplebed
Copy link
Author

maplebed commented Apr 8, 2014

To separate fixing the current bug where ganglia-logtailer breaks and spews cronspam on badly formed metrics from the feature request that it sanitize names in the same way as ganglia-core, I created #36 to track the latter so this can be merged separately.

@maplebed
Copy link
Author

maplebed commented Apr 8, 2014

I'm only sanitizing the name here, though the same rules should probably apply to the value.

jbuchbinder added a commit that referenced this pull request May 12, 2014
ganglia-logtailer quoting arguments in shelling out to prevent special characters from doing terrible things
@jbuchbinder jbuchbinder merged commit fdab114 into ganglia:master May 12, 2014
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

Successfully merging this pull request may close these issues.

None yet

2 participants