diff options
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -422,10 +422,13 @@ static void security(str) char *str; { - if (rb_safe_level() > 0) { - if (rb_env_path_tainted()) { + if (rb_env_path_tainted()) { + if (rb_safe_level() > 0) { rb_raise(rb_eSecurityError, "Insecure PATH - %s", str); } + else { + rb_warn("Insecure PATH - %s", str); + } } } @@ -521,8 +524,6 @@ rb_proc_exec(str) char *ss, *t; char **argv, **a; - security(str); - while (*str && ISSPACE(*str)) str++; |