Skip to content

Commit

Permalink
Improved: Make sure no pdf files containing unwanted attachments can …
Browse files Browse the repository at this point in the history
…be uploaded

(OFBIZ-12926)

Fixes checkstyle issues
  • Loading branch information
JacquesLeRoux committed Mar 12, 2024
1 parent c3653d5 commit 3d755e7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ private static boolean isValidPdfFile(String fileName) {
} 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",
Expand All @@ -546,7 +546,8 @@ private static boolean isValidPdfFile(String fileName) {
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);
Expand Down

0 comments on commit 3d755e7

Please sign in to comment.