You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "soumitra-st (via GitHub)" <gi...@apache.org> on 2023/07/21 13:34:18 UTC

[GitHub] [pinot] soumitra-st commented on a diff in pull request #11132: Sanitise API inputs used as file path variables

soumitra-st commented on code in PR #11132:
URL: https://github.com/apache/pinot/pull/11132#discussion_r1270682560


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/LLCSegmentCompletionHandlers.java:
##########
@@ -448,8 +448,10 @@ private static File extractSegmentFromFormToLocalTempFile(FormDataMultiPart form
           "Invalid multi-part for segment: %s", segmentName);
       FormDataBodyPart bodyPart = map.values().iterator().next().get(0);
 
-      File localTempFile = new File(ControllerFilePathProvider.getInstance().getFileUploadTempDir(),
-          getTempSegmentFileName(segmentName));
+      File localTempFile = org.apache.pinot.common.utils.FileUtils.concatAndValidateFile(

Review Comment:
   Shall we import org.apache.pinot.common.utils.FileUtils?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org