Bugzilla – Attachment 23241 Details for
Bug 11322
Suggestion "notes" field should be sanitized or escaped
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11322 : XSS in suggestions
Bug-11322--XSS-in-suggestions.patch (text/plain), 5.38 KB, created by
Chris Cormack
on 2013-12-02 22:36:59 UTC
(
hide
)
Description:
Bug 11322 : XSS in suggestions
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2013-12-02 22:36:59 UTC
Size:
5.38 KB
patch
obsolete
>From 79b9b7a57a28d0a16ced611c9fba24f35f90b944 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Tue, 3 Dec 2013 11:34:48 +1300 >Subject: [PATCH] Bug 11322 : XSS in suggestions > >To test >1/ Switch on purchase suggestions >2/ On the public interface (OPAC) add a suggestion, put html in every >field >3/ In the staff interface go to the suggestions page >/cgi-bin/koha/suggestion/suggestion.pl >4/ Notice the html is rendered >5/ Click on a suggestion, notice the html is rendered on the show page >also >6/ Apply the patch, check these two pages again, html should now be >escaped >--- > .../prog/en/modules/suggestion/suggestion.tt | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index e590142..7c6c98d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -187,12 +187,12 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > <legend>Bibliographic information</legend> > <ol> > <li><span class="label">Title:</span>[% title |html %]</li> >- <li><span class="label">Author:</span>[% author %]</li> >- <li><span class="label">Copyright date:</span>[% copyrightdate %]</li> >- <li><span class="label">ISBN or ISSN or other standard number:</span>[% isbn %]</li> >- <li><span class="label">Publisher:</span>[% publishercode %]</li> >- <li><span class="label">Publication place:</span>[% place %]</li> >- <li><span class="label">Collection title:</span>[% collectiontitle %]</li> >+ <li><span class="label">Author:</span>[% author |html %]</li> >+ <li><span class="label">Copyright date:</span>[% copyrightdate |html %]</li> >+ <li><span class="label">ISBN or ISSN or other standard number:</span>[% isbn |html %]</li> >+ <li><span class="label">Publisher:</span>[% publishercode |html %]</li> >+ <li><span class="label">Publication place:</span>[% place |html %]</li> >+ <li><span class="label">Collection title:</span>[% collectiontitle |html %]</li> > <li><span class="label">Document type:</span> > [% FOREACH itemtypeloo IN itemtypeloop %] > [% IF ( itemtypeloo.selected ) %][% itemtypeloo.description %][% END %] >@@ -205,7 +205,7 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > [% END %] > </li> > [% END %] >- <li><span class="label">Notes:</span>[% note %]</li> >+ <li><span class="label">Notes:</span>[% note |html %]</li> > </ol> > </fieldset> > <fieldset class="rows"> <legend>Suggestion management</legend> >@@ -490,9 +490,9 @@ h4.local_collapse a { font-size : 80%; text-decoration: none; } fieldset.brief o > [% suggestions_loo.title |html %][% IF ( suggestions_loo.author ) %], by [% suggestions_loo.author %][% END %]</a> > [<a href="suggestion.pl?suggestionid=[% suggestions_loo.suggestionid %]&op=edit" title="suggestion" >edit</a>] > <br /> >- [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate %] [% END %] >- [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc %]</i> [% END %] >- [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% suggestions_loo.itemtype %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<span class="note">[% suggestions_loo.note %]</span>[% END %] >+ [% IF ( suggestions_loo.copyrightdate ) %]© [% suggestions_loo.copyrightdate |html %] [% END %] >+ [% IF ( suggestions_loo.volumedesc ) %]; Volume:<i>[% suggestions_loo.volumedesc |html %]</i> [% END %] >+ [% IF ( suggestions_loo.isbn ) %]; ISBN:<i>[% suggestions_loo.isbn |html %]</i> [% END %][% IF ( suggestions_loo.publishercode ) %]; Published by [% suggestions_loo.publishercode |html %] [% END %][% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear |html %]</i> [% END %][% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place |html %]</i> [% END %][% IF ( suggestions_loo.collectiontitle ) %]; [% suggestions_loo.collectiontitle |html %] [% END %][% IF ( suggestions_loo.itemtype ) %]; [% suggestions_loo.itemtype |html %] [% END %]<br />[% IF ( suggestions_loo.note ) %]<span class="note">[% suggestions_loo.note |html%]</span>[% END %] > </td> > <td> > [% IF ( suggestions_loo.emailsuggestedby ) %]<a href="mailto:[% suggestions_loo.emailsuggestedby %]">[% END %][% suggestions_loo.surnamesuggestedby %][% IF ( suggestions_loo.firstnamesuggestedby ) %], [% suggestions_loo.firstnamesuggestedby %][% END %] [% IF ( suggestions_loo.emailsuggestedby ) %]</a>[% END %] >-- >1.8.3.2
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 11322
:
23241
|
23242
|
23243
|
23244
|
23245
|
23246
|
23247
|
23248
|
23249