]> git.koha-community.org Git - koha.git/commit
Bug 37488: Validate paths in datalink.txt/idlink.txt files
authorDavid Cook <dcook@prosentient.com.au>
Fri, 26 Jul 2024 04:01:43 +0000 (04:01 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 13 Aug 2024 14:53:58 +0000 (11:53 -0300)
commit478c7aae22f7399d48cf1f9019bd83ab8fd7a7be
tree9b732109f2db443ae750f7dfc4d0f1f5265e3911
parent54719a51e47d32dd8b4f7fc2fcdc282adae69d69
Bug 37488: Validate paths in datalink.txt/idlink.txt files

This change validates the paths in datalink.txt/idlink.txt,
so that only images in the unpacked archive directory are allowed

Test plan:
0. Apply the patch
1. koha-plack --reload kohadev
2. Create a datalink.txt file with the following:
42,selfie.jpg
3. Create a jpeg at selfie.jpg
4. ZIP the datalink.txt and selfie.jpg files
5. Upload to the "Upload patron images" tool
(after enabling the "patronimages" system preference)
6. Note that the image uploads correctly

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
tools/picture-upload.pl