Hello,
We are currently addressing commons io CVE where we need to upgrade it
from 2.4 to 2.11.0 . After the upgrade, one of our UTs is failing with
"Parameter 'file' is not a file: /dev/null" . Within the codeflow of the
test there is a call to FileUtils.write( File("/dev/null"), char sequence)
The documentation for File.isFile [1] reads:
"Tests whether the file denoted by this abstract pathname is a normal file."
/dev/null is not a normal file. It is a special file used to write
bytes without error. So use of this file would be under special
circumstances and is not something expected
Hi Alex,
Thanks for the prompt reply. The stack trace shows
openOutputStream(File, boolean) which is called by FileUtils.write(File,
charsequence). Thanks for the pointers. I will keep you posted.
Best,
Abhishek
On Mon, Oct 17, 2022 at 4:08 PM Alex Herbert
wrote:
> The documentation for File