2
I have path Manipulation problem in addAttachment.
ByteArrayOutputStream baos = new ByteArrayOutputStream();
hssWorkBook.write(baos);
byte[] bytes = baos.toByteArray();
DataSource ds = new ByteArrayDataSource(bytes, "application/excel");
helper.addAttachment("XYZ information - "+XYZ+".xls", ds);
helper.setText(text.toString(), true);
Iam嘗試從已創建的工作簿中添加xls作爲附件,但Fortify在addAttachment中給出了路徑操作錯誤。 我該如何解決這個問題?如何解決強化給出的路徑操作錯誤?