Bugzilla – Attachment 130934 Details for
Bug 26102
Javascript injection in intranet search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26102: [19.11] Prevent XSS when To.json is used: catalogue/results.tt
Bug-26102-1911-Prevent-XSS-when-Tojson-is-used-cat.patch (text/plain), 1.39 KB, created by
Jonathan Druart
on 2022-02-21 09:23:20 UTC
(
hide
)
Description:
Bug 26102: [19.11] Prevent XSS when To.json is used: catalogue/results.tt
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-02-21 09:23:20 UTC
Size:
1.39 KB
patch
obsolete
>From 07f49f636b255355f70f746ab7d92f85dc811f43 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 11 Aug 2020 12:57:48 +0000 >Subject: [PATCH] Bug 26102: [19.11] Prevent XSS when To.json is used: > catalogue/results.tt > >To test, perform a search in the catalogue and verify that search term >highlighting works correctly. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 68e5388e318..5f42a03de62 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -1,5 +1,6 @@ > [% USE raw %] > [% USE Asset %] >+[% USE To %] > [% USE Koha %] > [% USE Biblio %] > [% USE KohaDates %] >@@ -772,7 +773,7 @@ > > [% IF ( query_desc ) %] > toHighlight = $("p,span.results_summary,a.title"); >- var query_desc = "[% query_desc |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >+ var query_desc = "[% To.json( query_desc ) | html %]", > q_array = query_desc.split(" "); > // ensure that we don't have "" at the end of the array, which can > // break the highlighter >-- >2.25.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 26102
:
107579
|
108083
|
108084
|
108085
|
108086
|
108087
|
108088
|
108089
|
108090
|
119643
|
119644
|
119645
|
119646
|
119647
|
119648
|
119649
|
127669
|
127670
|
127671
|
127672
|
127673
|
127674
|
127675
|
128716
|
128717
|
128718
|
128719
|
128720
|
128721
|
128722
|
130931
|
130932
|
130933
|
130934
|
130935
|
130936
|
130999
|
131000
|
131001
|
131002
|
131003
|
131004