Hi All, We are seeing below issue in Sonar for below inline code, tried
different approached but not able to resolve the issue: Sonar
Issue:java/io/File.createTempFile(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
reads a file whose location might be specified by user
inputVulnerabilityMajor
findsecbugs:PATH_TRAVERSAL_INcwe,owasp-a4,waschttps://www.adobe.com/go/aem_cmcq_path_traversal_in_en
Code:String fileName = pdfArray[pdfArray.length - 2];File tempDir =
Files.createTempDi...