[
https://issues.apache.org/jira/browse/OFBIZ-13155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046661#comment-18046661
]
Gil Portenseigne commented on OFBIZ-13155:
------------------------------------------
Have you applied the patch ? There is a modification in it
{code:java}
diff --git
a/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
b/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
index cfe6e1f9ee..1908b06734 100644
---
a/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
+++
b/framework/security/src/main/java/org/apache/ofbiz/security/SecuredUpload.java
@@ -78,7 +78,10 @@ import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.base.util.UtilXml;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.util.EntityUtilProperties;
+import org.apache.pdfbox.io.RandomAccessReadBufferedFile;
+import org.apache.pdfbox.Loader;
import org.apache.pdfbox.pdmodel.PDDocument;
+//import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
import org.apache.pdfbox.pdmodel.PDEmbeddedFilesNameTreeNode;
import org.apache.tika.Tika;
@@ -561,7 +564,8 @@ public class SecuredUpload {
}
// OK no JS code, pass to check 2: detect if the document has any
embedded files
PDEmbeddedFilesNameTreeNode efTree = null;
- try (PDDocument pdDocument = PDDocument.load(file)) {
+ try (PDDocument pdDocument = Loader.loadPDF(new
RandomAccessReadBufferedFile(fileName))) {
+ //PDDocument.load(file)) {
PDDocumentNameDictionary names = new
PDDocumentNameDictionary(pdDocument.getDocumentCatalog());
efTree = names.getEmbeddedFiles();
} {code}
> Update to Apache Tika 3.0.0
> ---------------------------
>
> Key: OFBIZ-13155
> URL: https://issues.apache.org/jira/browse/OFBIZ-13155
> Project: OFBiz
> Issue Type: Improvement
> Components: content, framework/security, framework/widget
> Affects Versions: Upcoming Branch
> Reporter: Jacques Le Roux
> Assignee: Jacques Le Roux
> Priority: Major
> Fix For: Upcoming Branch
>
> Attachments: OFBIZ-13155-ecommerce.patch, OFBIZ-13155-framework.patch
>
>
> Follows [https://lists.apache.org/thread/wz7ds83q39t74n5lloy87m504m9r7gs9]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)