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

Escape arguments coming from Ruby scripts #170

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

Conversation

kylehowells
Copy link

The Ruby scripts did not work for my when I was trying the face detection example. I was doing a few things wrong, but eventually I got it to work. But only with files that didn't have spaces in the file path.

This commit escapes all the arguments being executed by the ruby scripts. Among other issues (safety) this also allows you pass the scripts images with spaces in their file paths.

http://ruby-doc.org/stdlib-2.0.0/libdoc/shellwords/rdoc/Shellwords.html

Allows you to pass in files with a space in their path, among other
benefits.
@kylehowells
Copy link
Author

Hi, this patch allows the ruby scripts to be used on file paths with spaces in them. If there's a problem please let me know and I'll try to correct them.

@liuliu
Copy link
Owner

liuliu commented Mar 7, 2017

Thank you. Will squash merge to unstable branch shortly after.

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.

2 participants