When using BagItPHP you should be aware.
- Tags order is not maintained.
- Destination paths are not validated. (ie.
data/../../..//var/lib
) - To properly add a fetch file to your bag you should:
- Add the Fetch URL (
$bag->fetch->add('http://something', 'data/destination')
). - Download the fetch files (
$bag->fetch->download()
). - Update the bag (
$bag->update()
) - Manually delete the downloaded files from the bag.
- Package your bag (
$bag->package('somefile', 'zip')
).
- Add the Fetch URL (
- Tag Manifests do not include any tag files files other than
bagit.txt
,bag-info.txt
,fetch.txt
andmanifest-(sha1|md5).txt
- Fetch files are not validated as part of the bag.