Closed Leeingnyo closed 2 years ago
Hey thanks for the report. I was trying to test this but the max filename length on Linux is 255 bytes so I couldn't create the file. Will try this on Windows + WSL.
Thanks for investigating on this.
For your reference: Though the max length of a Windows filename (including a path) is 260 bytes, I can only make a file with
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.zip
in C:\
, which it has 247-length filename including a path (C:\
)
Surprisingly, I found that the scan was ok when a filename consists of only ASCII characters. However, It failed when a long filename has non ascii characters (ex. Hangul)!
I can make the same file length with non ascii characters in Windows like a following one, but this file isn't appeared in the result of ls
at WSL2 and the mango scan failed.
가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차가나다라마바사아자차.zip
For a sure I say, I didn't mean to resolve this long filename issue. Why the same scan job doesn't show error log when called by API router, Is it automatically handled without logging?
I think it's because when the filename has only ASCII characters, its size in bytes is within the 255 bytes limits imposed by Linux so it works. When you include CJK characters, even when the number of characters is the same, the byte size increases and thus breaks on Linux.
Yeah it looks like we didn't do any error handling for this. Updating this to show an error message on top should be enough. I will work on this.
Hi there! The issue has been fixed in v0.26.0. Thanks for the bug report!
Describe the bug In WSL2, with a long filename (really long, its path has more than 200 characters, I think) scan job failed. here is an error log when starting the mango up
It's ok because this is caused by the limitation of Docker
However, a manual scan on an admin page doesn't print any error message. It just return 500 error, not logging what error occurs. Can we logging what this is when 500 error occurs?
To Reproduce Steps to reproduce the behavior:
/api/admin/scan
request got 500 status code. no error message in docker logExpected behavior Logging when 500 error occurs
Environment (please complete the following information):