diff options
author | Daniil Baturin <daniil@vyos.io> | 2020-06-19 02:11:21 +0300 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2020-06-19 02:13:23 +0300 |
commit | 3f84c582f966f83d86cf066328eeced4704d63a4 (patch) | |
tree | 4ccab777c811fd8b48dbb704c1461dc6360ef0af /src/validate_value.ml | |
parent | 581224a42995dcb68cb0f489ac446fe7655e5557 (diff) | |
download | vyos-utils-3f84c582f966f83d86cf066328eeced4704d63a4.tar.gz vyos-utils-3f84c582f966f83d86cf066328eeced4704d63a4.zip |
T1901: quote the value to avoid having the shell interpret anything as a part of the command.
Diffstat (limited to 'src/validate_value.ml')
-rw-r--r-- | src/validate_value.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validate_value.ml b/src/validate_value.ml index 3af58e0..250f9f1 100644 --- a/src/validate_value.ml +++ b/src/validate_value.ml @@ -11,7 +11,7 @@ let validate_value value_constraint value = especially when the input comes directly from the user... We should do something about it. *) - let result = Unix.system (Printf.sprintf "%s %s" c value) in + let result = Unix.system (Printf.sprintf "%s \'%s\'" c value) in match result with | Unix.WEXITED 0 -> true | Unix.WEXITED 127 -> |