Bugzilla – Attachment 65998 Details for
Bug 19108
Stored XSS in multiple scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19108 - Stored XSS in items_search_fields.pl
0001-Bug-19108-Stored-XSS-in-items_search_fields.pl.patch (text/plain), 3.98 KB, created by
Amit Gupta
on 2017-08-15 08:22:32 UTC
(
hide
)
Description:
Bug 19108 - Stored XSS in items_search_fields.pl
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2017-08-15 08:22:32 UTC
Size:
3.98 KB
patch
obsolete
>From 3b429a0223618e7d1eed7daabde85d82d8810243 Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amit.gupta@informaticsglobal.com> >Date: Tue, 15 Aug 2017 13:49:10 +0530 >Subject: [PATCH] Bug 19108 - Stored XSS in items_search_fields.pl > >To Test >1. Hit the page /cgi-bin/koha/admin/items_search_fields.pl >2. Add a text in the field Name and Label that contains js >3. Save the page. >4. Notice js is execute >5. Apply patch and reload, the js is escaped > >Fixed for new and edit page >--- > .../en/includes/admin-items-search-field-form.inc | 4 ++-- > .../prog/en/modules/admin/items_search_field.tt | 4 ++-- > .../prog/en/modules/admin/items_search_fields.tt | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc >index a55f6c3..4ab91b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc >@@ -3,7 +3,7 @@ > <li> > [% IF field %] > <span class="label">Name: </span> >- [% field.name %] >+ [% field.name |html %] > <input type="hidden" name="name" value="[% field.name %]"> > [% ELSE %] > <label class="required" for="name">Name: </label> >@@ -14,7 +14,7 @@ > <li> > <label class="required" for="label">Label: </label> > [% IF field %] >- <input type="text" name="label" id="label" value="[% field.label %]" class="required" required="required" /> >+ <input type="text" name="label" id="label" value="[% field.label |html %]" class="required" required="required" /> > [% ELSE %] > <input type="text" name="label" id="label" class="required" required="required" /> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt >index cd29b2f..06fcd06 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_field.tt >@@ -10,14 +10,14 @@ > <a href="/cgi-bin/koha/mainpage.pl">Home</a> › > <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › > <a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a> › >- [% field.name %] >+ [% field.name |html %] > </div> > > <div id="doc3" class="yui-t2"> > <div id="bd"> > <div id="yui-main"> > <div class="yui-b"> >- <h1>Item search field: [% field.label %]</h1> >+ <h1>Item search field: [% field.label |html %]</h1> > > <form action="/cgi-bin/koha/admin/items_search_field.pl" method="POST" class="validated"> > <fieldset class="rows"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt >index eb67749..0904553 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/items_search_fields.tt >@@ -27,7 +27,7 @@ > > [% IF field_added %] > <div class="dialog message"> >- Field successfully added: [% field_added.label %] >+ Field successfully added: [% field_added.label |html %] > </div> > [% ELSIF field_not_added %] > <div class="dialog alert"> >@@ -71,8 +71,8 @@ > <tbody> > [% FOREACH field IN fields %] > <tr> >- <td>[% field.name %]</td> >- <td>[% field.label %]</td> >+ <td>[% field.name |html %]</td> >+ <td>[% field.label |html %]</td> > <td>[% field.tagfield %]</td> > <td>[% field.tagsubfield %]</td> > <td>[% field.authorised_values_category %]</td> >-- >1.7.9.5 >
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 19108
:
65997
|
65998
|
65999
|
66000
|
66001
|
66002
|
66079
|
66080
|
66081
|
66082
|
66083
|
66084
|
66085
|
66442
|
66443
|
66444
|
66445
|
66446
|
66447
|
66448
|
67085