diff src/luan/host/WebHandler.java @ 1238:3d29033de2bf

changes for https
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 11 Jun 2018 22:03:09 -0600
parents 857eb648d4e5
children c147e2e877e3
line wrap: on
line diff
--- a/src/luan/host/WebHandler.java	Mon Jun 11 18:22:51 2018 -0600
+++ b/src/luan/host/WebHandler.java	Mon Jun 11 22:03:09 2018 -0600
@@ -214,7 +214,7 @@
 
 	private static final JavaLuan.Security javaSecurity = new JavaLuan.Security() {
 		public void check(LuanState luan,String name) throws LuanException {
-			if( !name.startsWith("luan:") )
+			if( !(name.startsWith("luan:") || name.matches("^file:[^/]+$")) )
 				throw new LuanException("Security violation - only luan:* modules can load Java");
 			if( name.equals("luan:logging/Logging") )
 				throw new LuanException("Security violation - cannot reload Logging");