From b8baa9cfd5171be4e48eabd409583011e78834c3 Mon Sep 17 00:00:00 2001 From: Alfonso Altamirano Date: Mon, 19 Feb 2024 18:21:24 -0600 Subject: [PATCH] FISH-7212: avoiding creation of temporal files on local system --- .../admin/remote/reader/MultipartProprietaryReader.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/remote/reader/MultipartProprietaryReader.java b/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/remote/reader/MultipartProprietaryReader.java index 103680b94c9..d07a7b2fdec 100644 --- a/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/remote/reader/MultipartProprietaryReader.java +++ b/nucleus/admin/util/src/main/java/com/sun/enterprise/admin/remote/reader/MultipartProprietaryReader.java @@ -37,7 +37,7 @@ * only if the new code is made subject to such option by the copyright * holder. */ -//Portions Copyright [2022] [Payara Foundation and/or its affiliates] +//Portions Copyright [2022-2024] [Payara Foundation and/or its affiliates] package com.sun.enterprise.admin.remote.reader; import com.sun.enterprise.admin.remote.ParamsWithPayload; @@ -94,7 +94,9 @@ public ParamsWithPayload readFrom(final InputStream is, final String contentType if (!StringUtils.ok(boundary)) { throw new IOException("ContentType does not define boundary"); } - final MIMEMessage mimeMessage = new MIMEMessage(is, boundary, new MIMEConfig()); + MIMEConfig mimeConfig = new MIMEConfig(); + mimeConfig.setMemoryThreshold(-1L); + final MIMEMessage mimeMessage = new MIMEMessage(is, boundary, mimeConfig); //Parse for (MIMEPart mimePart : mimeMessage.getAttachments()) { String cd = getFirst(mimePart.getHeader("Content-Disposition"));