This is an automated email from the ASF dual-hosted git repository. jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new 3d755e7cd0 Improved: Make sure no pdf files containing unwanted attachments can be uploaded (OFBIZ-12926) 3d755e7cd0 is described below commit 3d755e7cd023015f2c53a902265058f8bdca3b64 Author: Jacques Le Roux <jacques.le.r...@les7arts.com> AuthorDate: Tue Mar 12 11:09:58 2024 +0100 Improved: Make sure no pdf files containing unwanted attachments can be uploaded (OFBIZ-12926) Fixes checkstyle issues --- .../src/main/java/org/apache/ofbiz/security/SecuredUpload.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 08bb5ab8e9..79c5ccd377 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 @@ -527,7 +527,7 @@ public class SecuredUpload { } else { try { Document document = UtilXml.readXmlDocument(importer.getUTF8()); - if (document.toString().equals("[#document: null]")) { + if (document.toString().equals("[#document: null]")) { safeState = false; Debug.logInfo("The file " + file.getAbsolutePath() + " is not a readable (valid and secure) PDF file. For security reason it's not accepted as a such file", @@ -546,7 +546,8 @@ public class SecuredUpload { safeState = Objects.isNull(efTree) || canParseZUGFeRD; } catch (Exception e) { safeState = false; - Debug.logInfo(e, "The file " + file.getAbsolutePath() + " is not a readable (valid and secure) PDF file. For security reason it's not accepted as a such file", + Debug.logInfo(e, "The file " + file.getAbsolutePath() + " is not a readable (valid and secure) PDF file. " + + "For security reason it's not accepted as a such file", MODULE); } file = new File(fileName);