Entry names read from a squashfs directory are not sanitized by go-diskfs. The squashfs backend joined each leaf name onto its directory to form the object's remote, so a crafted image could escape its directory. Use sanitize.Leaf to skip unsafe entries in List. A "\" is an ordinary character in a file name on the systems squashfs images are made on and in an rclone remote path, so it is deliberately not rejected; making it safe for the destination is the destination backend's job. Skipped entries are logged at DEBUG with a single NOTICE count per listing so a crafted image under a mount cannot flood the log.
4.0 KiB
4.0 KiB