dsmiley commented on a change in pull request #1490: URL: https://github.com/apache/lucene-solr/pull/1490#discussion_r425952778
########## File path: solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java ########## @@ -571,59 +552,99 @@ public SolrParams parseParamsAndFillStreams( } } - - /** * Extract Multipart streams */ static class MultipartRequestParser implements SolrRequestParser { - private final int uploadLimitKB; - private DiskFileItemFactory factory = new DiskFileItemFactory(); - - public MultipartRequestParser(int limit) { - uploadLimitKB = limit; + private final MultipartConfigElement multipartConfigElement; - // Set factory constraints - FileCleaningTracker fct = fileCleaningTracker; - if (fct != null) { - factory.setFileCleaningTracker(fileCleaningTracker); - } - // TODO - configure factory.setSizeThreshold(yourMaxMemorySize); - // TODO - configure factory.setRepository(yourTempDirectory); + public MultipartRequestParser(int uploadLimitKB) { + multipartConfigElement = new MultipartConfigElement( + null, // temp dir (null=default) + -1, // maxFileSize (-1=none) + uploadLimitKB * 1024, // maxRequestSize + 1 * 1024 * 1024 ); // fileSizeThreshold after which will go to disk Review comment: ```suggestion 100 * 1024 ); // fileSizeThreshold after which will go to disk ``` Lowering to reduce DoS risk ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org