Validate source and mount path.
This CL add validations of the source and mount path to ensure:
1. The source path is fully canonicalized before being checked by the
CanMount() method of a mount manager.
2. The mount path must be an immediate child of the mount root
directory of a mount manager.
TEST=Tested the following:
1. Build and run unit tests.
2. Run the following tests:
3. Verify that Files.app can mount an external USB drive.
4. Verify that Files.app can open a ZIP file from:
- user's Downloads directory
- an external USB drive
- within another ZIP file
Reviewed-by: Ben Chan <firstname.lastname@example.org>
Commit-Queue: Ben Chan <email@example.com>
Tested-by: Ben Chan <firstname.lastname@example.org>
Reviewed-by: Kees Cook <email@example.com>
Reviewed-by: Jorge Lucangeli Obes <firstname.lastname@example.org>
7 files changed