Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
In MESOS-4735, CommandInfo.URI.filename is added but there is no validation to make sure it's a simple basename, so people can actually specify the filename to be something like path/to/file but the validation won't catch it. The fetch will fail later in download() because it cannot open a destination file without its parent directory.
Instead of fixing this by disallowing such output filename, we could actually support this behavior. There are use cases where multiple fetch targets have the same basename but they are organized by a directory hierarchy.
root/app.dat root/parent/app.dat root/parent/child/app.dat
It looks to me that supporting this is straightforward and we just need to 1) make sure the output path is within the sandbox and 2) recursively mkdirs for the parent dirs.
Attachments
Issue Links
- is related to
-
MESOS-4735 CommandInfo.URI should allow specifying target filename
- Resolved