Bugzilla – Attachment 53909 Details for
Bug 17023
z3950_search.pl are vulnerable to XSS attacks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17023: Fix XSS in acqui/z3950_search.pl
Bug-17023-Fix-XSS-in-acquiz3950searchpl.patch (text/plain), 11.50 KB, created by
Jonathan Druart
on 2016-08-02 14:29:13 UTC
(
hide
)
Description:
Bug 17023: Fix XSS in acqui/z3950_search.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-08-02 14:29:13 UTC
Size:
11.50 KB
patch
obsolete
>From a69adee828b943b000c6d4d150739e7ec5d9c04f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 2 Aug 2016 14:15:09 +0100 >Subject: [PATCH] Bug 17023: Fix XSS in acqui/z3950_search.pl > >Test plan: >Enter the following in the different inputs: ><script>alert('XSS')</script> > >=> Without this patch you will see the alert >=> With this patch, no more alert >--- > .../prog/en/modules/acqui/z3950_search.tt | 56 +++++++++++----------- > 1 file changed, 28 insertions(+), 28 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >index f2ce9dd..8d89fcc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >@@ -51,7 +51,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% INCLUDE 'header.inc' %] > [% INCLUDE 'acquisitions-search.inc' %] > >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> › [% IF ( opsearch ) %]Order from external source[% ELSE %]<a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Order from external source</a> › Search results[% END %]</div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a> › [% IF ( opsearch ) %]Order from external source[% ELSE %]<a href="/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Order from external source</a> › Search results[% END %]</div> > > <div id="doc3" class="yui-t7"> > <div id="bd"> >@@ -64,11 +64,11 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <fieldset class="rows"> > <ol> > <li><label for="searchtitle">Title: </label> <input type="text" id="searchtitle" name="title" value="[% title |html %]" class="focus" /></li> >- <li><label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn %]" /></li> >+ <li><label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" /></li> > <li><label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="" /></li> > <li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li> >- <li><label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author %]" /></li> >- <li><label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn %]" /></li> >+ <li><label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author | html %]" /></li> >+ <li><label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn | html %]" /></li> > <li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li> > <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li> > <li><label for="frameworkcode" >Select MARC framework:</label> >@@ -86,9 +86,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li> > </ol> > </fieldset> >- <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> >- <input type="hidden" name="basketno" value="[% basketno %]" /> >- <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> >+ <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> >+ <input type="hidden" name="basketno" value="[% basketno | html %]" /> >+ <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" /> > </div> > <div class="yui-u second"> > <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span></h2> >@@ -108,7 +108,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > </div> > </div> > >- <fieldset class="action"><input type="submit" class="submit" value="Search" /> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a></fieldset> >+ <fieldset class="action"><input type="submit" class="submit" value="Search" /> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid | uri %]&basketno=[% url %]">Cancel</a></fieldset> > </form> > > >@@ -116,14 +116,14 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <h2>Search results</h2> > > <p>You searched for: >- [% IF ( title ) %]<em>Title: </em><span class=term>[% title %]</span> [% END %] >- [% IF ( author ) %]<em>Author: </em><span class=term>[% author %]</span> [% END %] >- [% IF ( isbn ) %]<em>ISBN: </em><span class=term>[% isbn %]</span> [% END %] >- [% IF ( issn ) %]<em>ISSN: </em><span class=term>[% issn %]</span> [% END %] >- [% IF ( lccall ) %]<em>LC call number: </em><span class=term>[% lccall %]</span> [% END %] >- [% IF ( subject ) %]<em>Subject heading: </em><span class=term>[% subject %]</span> [% END %] >- [% IF ( controlnumber ) %]<em>Control no: </em><span class=term>[% controlnumber %]</span> [% END %] >- [% IF ( dewey ) %]<em>Dewey: </em><span class=term>[% dewey %]</span> [%END %] >+ [% IF ( title ) %]<em>Title: </em><span class=term>[% title | html %]</span> [% END %] >+ [% IF ( author ) %]<em>Author: </em><span class=term>[% author | html %]</span> [% END %] >+ [% IF ( isbn ) %]<em>ISBN: </em><span class=term>[% isbn | html %]</span> [% END %] >+ [% IF ( issn ) %]<em>ISSN: </em><span class=term>[% issn | html %]</span> [% END %] >+ [% IF ( lccall ) %]<em>LC call number: </em><span class=term>[% lccall | html %]</span> [% END %] >+ [% IF ( subject ) %]<em>Subject heading: </em><span class=term>[% subject | html %]</span> [% END %] >+ [% IF ( controlnumber ) %]<em>Control no: </em><span class=term>[% controlnumber | html %]</span> [% END %] >+ [% IF ( dewey ) %]<em>Dewey: </em><span class=term>[% dewey | html %]</span> [%END %] > </p> > > [% IF ( breeding_loop ) %] >@@ -141,13 +141,13 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% IF ( breeding_loo.breedingid ) %] > > <tr> >- <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&breedingid=[% breeding_loo.breedingid %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td> >+ <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Order</a> <a href="#" id="closemenu" title="Close this menu"> X </a></div></td> > <td>[% breeding_loo.title |html %]</td> > <td>[% breeding_loo.author %]</td> > <td>[% breeding_loo.isbn %]</td> > <td>[% breeding_loo.lccn %]</td> > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" title="MARC" class="previewData">MARC</a> |Â <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" title="Card" class="previewData">Card</a></td> >- <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode %]&breedingid=[% breeding_loo.breedingid %]&booksellerid=[% booksellerid %]&basketno=[% basketno %]">Order</a></td> >+ <td><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">Order</a></td> > > </tr> > [% END %] >@@ -172,16 +172,16 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <input type="hidden" name="op" id="op" value="do_search" /> > <input type="hidden" name="current_page" id="current_page" value="[% current_page %]" /> > <input type="hidden" id="searchtitle" name="title" value="[% title |html %]" /> >- <input type="hidden" id="isbn" name="isbn" value="[% isbn %]" /> >- <input type="hidden" id="lccall" name="lccall" value="[% lccall %]" /> >- <input type="hidden" id="author" name="author" value="[% author %]" /> >- <input type="hidden" id="subject" name="subject" value="[% subject %]" /> >- <input type="hidden" id="dewey" name="dewey" value="[% dewey %]" /> >- <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /> >- <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> >- <input type="hidden" name="controlnumber" value="[% controlnumber %]" /> >- <input type="hidden" name="basketno" value="[% basketno %]" /> >- <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> >+ <input type="hidden" id="isbn" name="isbn" value="[% isbn | html %]" /> >+ <input type="hidden" id="lccall" name="lccall" value="[% lccall | html %]" /> >+ <input type="hidden" id="author" name="author" value="[% author | html %]" /> >+ <input type="hidden" id="subject" name="subject" value="[% subject | html %]" /> >+ <input type="hidden" id="dewey" name="dewey" value="[% dewey | html %]" /> >+ <input type="hidden" name="frameworkcode" value="[% frameworkcode | html %]" /> >+ <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> >+ <input type="hidden" name="controlnumber" value="[% controlnumber | html %]" /> >+ <input type="hidden" name="basketno" value="[% basketno | html %]" /> >+ <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" /> > > [% FOREACH server IN servers %] > <input type="hidden" name="id" id="z3950_[% server.id %]" value="[% server.id %]" /> >-- >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 17023
:
53908
|
53909
|
53969
|
53970
|
53975
|
53976
|
54149
|
54150
|
54533
|
54534
|
54681