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中给出了路径操作错误。 我该如何解决这个问题?如何解决强化给出的路径操作错误?