image-burner: handle /home/chronos/u-<hash>/* in source path validation
CL:457403 added a simple check to verify that the source path is within
a few allowed locations from where the image file can be read. However,
the simple check didn't handle /home/chronos/u-<hash>/*, which is an
allowed location. This CL improves the check.
BUG=chromium:702030
TEST=Run unit tests.
TEST=Test burning a recovery image, from the following locations, to a
USB drive on Chromebook via the Chromebook Recovery Utility and
OnHub Recovery Utility app:
- the Download folder
- a Drive folder
- a mounted zip file
- another mounted USB drive
Change-Id: Iaef0ce5bb586840b7bc9ec70360c55e7997b54da
Reviewed-on: https://chromium-review.googlesource.com/469233
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
3 files changed