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)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Tue, 25 May 2021 15:09:19 +0000 (17:09 +0200)
commit176cb194319a45566df1332cd62e547abdc812cc
tree33076548d72b131cf68047c655765ffbfe115da4
parent7ff672e6dc86d63aac2bd19be9426e1bdecb4086
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>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt
opac/opac-shelves.pl