Bugzilla – Attachment 170414 Details for
Bug 37655
XSS vulnerability in basic editor handling of title
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37655: Basic editor needs to HTML-escape the bib record title used as a heading
Bug-37655-Basic-editor-needs-to-HTML-escape-the-bi.patch (text/plain), 2.11 KB, created by
Phil Ringnalda
on 2024-08-15 22:50:34 UTC
(
hide
)
Description:
Bug 37655: Basic editor needs to HTML-escape the bib record title used as a heading
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2024-08-15 22:50:34 UTC
Size:
2.11 KB
patch
obsolete
>From 49837824cd467e72906eb5bd63cdae94a3245db6 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Thu, 15 Aug 2024 15:41:18 -0700 >Subject: [PATCH] Bug 37655: Basic editor needs to HTML-escape the bib record > title used as a heading >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >We stick the title of a bib record you are editing in the basic editor into >an <h1> without escaping any HTML it might contain. We should instead escape >it. > >Test plan: > >1. Without the patch, search for any record in the catalog and click Edit > record (if you are in the advanced editor, switch to the basic one) >2. Tab 2, Field 245, Subfield a, paste <script>alert('boo â¤')</script><h2> > at the end of the subfield >3. Save, then from the record detail page select Edit - Edit record >4. You will have gotten an alert(), and the entire form will be the size > of an <h2>. That's ugly, so go back to the detail page. >5. Apply patch, restart_all >6. Edit - Edit record >7. Now you should not get an alert, the whole title inluding the <script> > should display in italics, and the "(Record number nnn)" after it should > not be italicized. >--- > .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 9a41b4d461..4b806cf4c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -869,7 +869,7 @@ $(document).ready(function(){ > > <h1> > [% IF ( biblionumber ) %] >- Editing [% title | $HtmlTags tag="em" %] (Record number [% biblionumber | html %]) >+ Editing [% title | html | $HtmlTags tag="em" %] (Record number [% biblionumber | html %]) > [% ELSE %] > [% IF (circborrowernumber) %] > <span>Add MARC record (fast cataloging)</span> >-- >2.44.0
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 37655
:
170414
|
170415