Mercurial Hosting > luan
comparison 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 |
comparison
equal
deleted
inserted
replaced
1237:275d1b52dbce | 1238:3d29033de2bf |
---|---|
212 }; | 212 }; |
213 } | 213 } |
214 | 214 |
215 private static final JavaLuan.Security javaSecurity = new JavaLuan.Security() { | 215 private static final JavaLuan.Security javaSecurity = new JavaLuan.Security() { |
216 public void check(LuanState luan,String name) throws LuanException { | 216 public void check(LuanState luan,String name) throws LuanException { |
217 if( !name.startsWith("luan:") ) | 217 if( !(name.startsWith("luan:") || name.matches("^file:[^/]+$")) ) |
218 throw new LuanException("Security violation - only luan:* modules can load Java"); | 218 throw new LuanException("Security violation - only luan:* modules can load Java"); |
219 if( name.equals("luan:logging/Logging") ) | 219 if( name.equals("luan:logging/Logging") ) |
220 throw new LuanException("Security violation - cannot reload Logging"); | 220 throw new LuanException("Security violation - cannot reload Logging"); |
221 } | 221 } |
222 }; | 222 }; |