File names/parts with trailing spaces are not sanitized
BeefaloKing opened this issue ยท 1 comments
Minecraft Version
1.19.x
Version
1.101
Details
Windows does not like file names with trailing spaces, and this is especially noticeable when you try to make a directory whose name consists of only spaces.
This can be exploited by running something like
mkdir "/ / /foo"
which leaves a broken directory that produces access denied (or other errors) when you try to operate on and/or delete it (from both CC and windows explorer).
You can also see part of this bug by running
cd " "
which, even if the directory " "
does not exist, the cd succeeds. This one isn't as harmful.
I don't think there's any serious exploit that can be done with this, and IMO the bigger bug here is in Windows, but it is definitely incorrect behavior.
Thanks for the report! Hehe this is nasty, filesystems are always so tricky to abstract over.
I've fixed this in b8fce1e.