]> git.koha-community.org Git - koha.git/commit
Bug 28409: Comprehensively validate category in opac-shelves.pl
authorDavid Cook <dcook@prosentient.com.au>
Fri, 21 May 2021 06:52:25 +0000 (06:52 +0000)
committerWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Sun, 27 Jun 2021 04:46:14 +0000 (04:46 +0000)
commit030d30694402fc3ea1f1eaec77b81e19e1e6a599
treef7dd14afac5996f146974c6a75fe78e7224afa93
parent6928a0aaa84c34d85c589581de3ea68244669620
Bug 28409: Comprehensively validate category in opac-shelves.pl

Default to a category of 1 (ie Private). Only allow input of 1
or 2 (ie Public)

== Test plan ==
1. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
2. Note that you are redirected to another website
3. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=add&shelfname=foo&category=9
4. Note that you can't see this list in the Lists (but it has been added to the database)
5. Apply the patch & restart services
6. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?category=function(){window.location.href%20=%20%27https://git.koha-community.org/stats/koha-master/authors.html%27}()
7. Note that you are not redirected to another website
8. Go to http://localhost:8080/cgi-bin/koha/opac-shelves.pl?op=add&shelfname=bar&category=9
9. Note that "bar" has been added as a Private list

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
(cherry picked from commit fa3adb5c05535f73666b06acab95518c9267abc1)
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
(cherry picked from commit fa3adb5c05535f73666b06acab95518c9267abc1)
opac/opac-shelves.pl