Bugzilla – Attachment 174656 Details for
Bug 38468
Staff interface detail page vulnerable to reflected XSS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38468: Add double quotes to some template strings
Bug-38468-Add-double-quotes-to-some-template-strin.patch (text/plain), 2.52 KB, created by
David Cook
on 2024-11-18 04:16:42 UTC
(
hide
)
Description:
Bug 38468: Add double quotes to some template strings
Filename:
MIME Type:
Creator:
David Cook
Created:
2024-11-18 04:16:42 UTC
Size:
2.52 KB
patch
obsolete
>From c967579fe2dd14bd05845d26c46129e7f0f15284 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 18 Nov 2024 04:14:37 +0000 >Subject: [PATCH] Bug 38468: Add double quotes to some template strings > >This change adds double quotes to some template strings where >quotes are missing all together or single quotes are used incorrectly. > >Test plan: >0. Apply the patch >1. Go to http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test >2. Click on "Gairm" >3. Use the shelf browser to go to the next result >4. Note that everything loads correctly > >5. To test that the security hole has been fixed, try some of the >proof-of-concept attacks provided for biblionumber and searchid >--- > koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc | 4 ++-- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >index 6ea79d927a..510c2baf35 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalog-strings.inc >@@ -2,7 +2,7 @@ > <!-- catalog-strings.inc --> > <script> > /* Some required variables from the template */ >- var biblionumber = [% biblionumber | html %]; >+ var biblionumber = "[% biblionumber | html %]"; > var count = [% count || 0 | html %]; > var holdcount = [% holdcount || 0 | html %]; > [% SET orders = biblio.orders %] >@@ -11,7 +11,7 @@ > var countorders = [% current.count || 0 | html %]; > var countdeletedorders = [% cancelled.count || 0 | html %]; > var subscriptionscount = [% biblio.subscriptions.count || 0 | html %]; >- var searchid = '[% searchid | html %]'; >+ var searchid = "[% searchid | html %]"; > > /* provide Z3950 search points */ > function GetZ3950Terms(){ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 4fb8c280e1..a4fa6a03db 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -1650,7 +1650,7 @@ > [% Asset.js("js/modals/place_booking.js") | $raw %] > <script> > var browser; >- browser = KOHA.browser('[% searchid | html %]', parseInt(biblionumber, 10)); >+ browser = KOHA.browser("[% searchid | html %]", parseInt(biblionumber, 10)); > browser.show(); > > [% IF bundlesEnabled %] >-- >2.39.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 38468
:
174656
|
175034
|
176055