Bug 14418: More XSS vulnerabilities in opac-shelves.pl
authorChris Cormack <chrisc@catalyst.net.nz>
Thu, 18 Jun 2015 23:41:45 +0000 (11:41 +1200)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 22 Jun 2015 21:44:15 +0000 (09:44 +1200)
commitf9569612b65798dce457b5650a5b5162b80b12e8
tree78b346ebd898c154385c961c56f14a05c236f1af
parent04fe052de7337f7c348de69df3d0ec1184b80e8d
Bug 14418: More XSS vulnerabilities in opac-shelves.pl

To test:
1/ Hit a url like
/cgi-bin/koha/opac-shelves.pl?viewshelf=7&op=modif&display="><script>alert('oh
noes')</script>  Where the id is a valid shelf id
2/ Notice the js is executed
3/ Apply patch
4/ Reload page
5/ Notice input is now escaped on display

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Tested in Debian, couldn't reproduce the alert in Iceweasel, but in
Chromium. Patch fixes it.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit cd4c959f7226b060f683f5571f030cc2df7539ca)
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt