Bug 20982: Sanitize category to prevent XSS on opac-shelves.pl
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 20 May 2021 06:34:48 +0000 (08:34 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 24 May 2021 08:05:37 +0000 (10:05 +0200)
commit9fc3f224d2517844c9f7d36e394959d1d064a767
tree432c2b8716e5ef61058e956d7e7519e7b4108a0b
parentc47fe0c6d8ce336e19d3167ff3b729b8a9026786
Bug 20982: Sanitize category to prevent XSS on opac-shelves.pl

== 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. Apply the patch & restart services
4. Repeat the above and you are not redirected

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
opac/opac-shelves.pl