Bug 16958: Fix XSS in opac-imageviewer.pl
Test plan: Trigger /opac-imageviewer.pl?biblionumber=14&imagenumber=7"><sCrIpT>alert(42)<%2fsCrIpT> => Without this patch you will see the JS alert => With this patch applied you won't see it Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
87d96b973a
commit
65918b146c
1 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@
|
|||
<div class="span9">
|
||||
<div id="imageviewer">
|
||||
<div id="largeCover">
|
||||
<img id="largeCoverImg" alt="" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% imagenumber %]" />
|
||||
<img id="largeCoverImg" alt="" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% imagenumber | url %]" />
|
||||
</div>
|
||||
</div> <!-- / #imageviewer -->
|
||||
</div> <!-- / .span12 -->
|
||||
|
@ -94,7 +94,7 @@
|
|||
<div id="thumbnails">
|
||||
[% FOREACH img IN images %]
|
||||
[% IF img %]
|
||||
<a href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% img %]" onclick="showCover([% img %]); return false;">
|
||||
<a href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber | url %]&imagenumber=[% img %]" onclick="showCover([% img %]); return false;">
|
||||
[% IF ( imagenumber == img ) %]
|
||||
<img class="thumbnail selected" id="[% img %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% img %]&thumbnail=1" alt="Thumbnail"/>
|
||||
[% ELSE %]
|
||||
|
@ -120,7 +120,7 @@
|
|||
//<![CDATA[
|
||||
$(document).ready(function(){
|
||||
$("#largeCoverImg").attr("src","[% interface %]/[% theme %]/images/loading.gif");
|
||||
showCover([% imagenumber %]);
|
||||
showCover([% imagenumber | html %]);
|
||||
});
|
||||
|
||||
function showCover(img) {
|
||||
|
|
Loading…
Reference in a new issue