Bugzilla – Attachment 53622 Details for
Bug 16958
opac-imageviewer.pl is vulnerable to XSS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16958: Fix XSS in opac-imageviewer.pl
Bug-16958-Fix-XSS-in-opac-imageviewerpl.patch (text/plain), 2.62 KB, created by
Jonathan Druart
on 2016-07-22 07:17:41 UTC
(
hide
)
Description:
Bug 16958: Fix XSS in opac-imageviewer.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-07-22 07:17:41 UTC
Size:
2.62 KB
patch
obsolete
>From dc3e012e33dabc58e44e14f87ece4c0342c18476 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 22 Jul 2016 08:14:27 +0100 >Subject: [PATCH] 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 >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >index 9598f4d..5985b93 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt >@@ -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) { >-- >2.8.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16958
:
53622
|
53633
|
53640