]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 6 Jul 2021 08:12:54 +0000 (10:12 +0200)
commite99f7ad63f45f85e6e7d2f3080a960379e3e6f79
tree0404c14d77dda3e9e93b210334eca9c3362a1aef
parentd5a792ddf5970205b38cf20231f1a249318730f3
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
opac/opac-shelves.pl