149150151152153154155156157
public static void executeJssp(File file, Request request, Response response) { File explained; try { explained = explainJssp(file); } catch (IOException e) { throw new ServerException(e); } executeExplained(explained, request, response); }
190191192193194195196197198199
IOUtil.copy(is, response.getOutputStream()); } } catch (SocketException e) { throw new ClientAbortException(); } catch (IOException e) { throw new ServerException(e); } catch (ScriptException e) { throw new ServerException(e); } }
4567891011
public class UrlSecurityUtil { public static void checkUrlUpFolder(String url) { if (url.replace('\\', '/').contains("/../")) { throw new ServerException("Contains up folder."); } }
154155156157158159160161162163164
} try { key = URLDecoder.decode(key, encoding); value = URLDecoder.decode(value, encoding); } catch (UnsupportedEncodingException e) { throw new ServerException(e); } pairs.add(new Pair<String, String>(key, value)); } } return pairs;
343536373839404142
try { Processor processor = (Processor) Class.forName(procn).newInstance(); processor.init(); processors.add(new ProcessorInfo(filter, processor)); } catch (Exception e) { throw new ServerException(e); } } }
3132333435363738
Writer writer = response.getWriter(); try { writer.write(buffer.toString()); writer.flush(); } catch (IOException e) { throw new ServerException(e); } }