Repository navigation
ezmultiupload 6.1.3: stricter access and limit checks
The upload service and the ZIP importer check access and limits more strictly (pull request #5), with two further checks of the location actions.
Upload service
- A location or item the user cannot read is answered like one that does not exist: no name, no path, the same message (
check,uploadTarget(), Move, Add location, Remove and the upload page). - Paths, the location picker's path and an uploaded item's list of locations leave out the locations the user cannot read.
- Without a form token in use, a request is taken only when the browser says it comes from the same origin (
Sec-Fetch-Site, or theOriginheader where noSec-Fetch-Siteis sent). - Remove asks, as the kernel's remove view does, whether every location of the item may be removed with everything below it (
can_remove_all), and refuses an item with items below it. - Move, Add location and Remove refuse an item with a top-level location, and the root node as a target.
ZIP importer
- ZIP files inside an archive are unpacked within
MaxTotalSizetogether, over all levels; pastMaxEntriesthe walk stops on every level. extract()removes its own directory when it fails; a directory left behind by a request that died is removed by a later import after an hour.
Tests: tests/expMultiuploadServiceAccessTest.php (new, 7 cases) and tests/expMultiuploadZipImporterTest.php (18 cases), both without the kernel. Changelog: doc/changelog.md.