changeset 1128:34dfed3b5cb0

fix security
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 26 Nov 2017 21:16:39 -0700
parents 5c99a3c0f882
children 3234a14bb1f8
files src/luan/modules/IoLuan.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/IoLuan.java	Sun Nov 26 21:08:49 2017 -0700
+++ b/src/luan/modules/IoLuan.java	Sun Nov 26 21:16:39 2017 -0700
@@ -844,6 +844,7 @@
 	public static final class LuanOs extends BaseOs {
 		private LuanOs(LuanState luan,String cmd,LuanTable options) throws IOException, LuanException {
 			super(luan,cmd,options);
+			check(luan,"os:"+cmd);
 			this.proc = Runtime.getRuntime().exec(cmd,null,dir);
 		}
 	}
@@ -855,6 +856,7 @@
 	public static final class LuanBash extends BaseOs {
 		private LuanBash(LuanState luan,String cmd,LuanTable options) throws IOException, LuanException {
 			super(luan,cmd,options);
+			check(luan,"bash:"+cmd);
 			this.proc = Runtime.getRuntime().exec(new String[]{"bash","-c",cmd},null,dir);
 		}
 	}