From 2ca16969613724a18d4106cc20516b17babf8a44 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Mon, 1 Apr 2019 15:13:09 -0700 Subject: [PATCH] LP#1822630: further sanitizing of CGI params when embedded in HTML Signed-off-by: Jeff Davis Signed-off-by: Chris Sharp Signed-off-by: Jason Stephenson (cherry picked from commit e2d401a9da3c70c1e56e518f40d0de928919990f) --- Open-ILS/src/templates/opac/parts/ebook_api/base_js.tt2 | 6 +++--- Open-ILS/src/templates/opac/parts/header.tt2 | 2 +- Open-ILS/src/templates/opac/parts/place_hold.tt2 | 2 +- Open-ILS/src/templates/opac/parts/place_hold_result.tt2 | 4 ++-- Open-ILS/src/templates/opac/parts/result/adv_filter.tt2 | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/ebook_api/base_js.tt2 b/Open-ILS/src/templates/opac/parts/ebook_api/base_js.tt2 index d5ba0f48ea..668b5fab3e 100644 --- a/Open-ILS/src/templates/opac/parts/ebook_api/base_js.tt2 +++ b/Open-ILS/src/templates/opac/parts/ebook_api/base_js.tt2 @@ -45,13 +45,13 @@ dojo.forEach(vendor_list, function(v) { // essential info for performing a transaction var ebook_action = {}; [%- IF CGI.param("action").defined %] -ebook_action.type = '[% CGI.param("action") %]'; +ebook_action.type = '[% CGI.param("action") | html %]'; [%- END -%] [%- IF CGI.param("title").defined %] -ebook_action.title_id = '[% CGI.param("title") %]'; +ebook_action.title_id = '[% CGI.param("title") | html %]'; [%- END -%] [%- IF CGI.param("vendor").defined %] -ebook_action.vendor = '[% CGI.param("vendor") %]'; +ebook_action.vendor = '[% CGI.param("vendor") | html %]'; [%- END -%] [% IF ctx.user %] diff --git a/Open-ILS/src/templates/opac/parts/header.tt2 b/Open-ILS/src/templates/opac/parts/header.tt2 index de933e9e62..81789655e2 100644 --- a/Open-ILS/src/templates/opac/parts/header.tt2 +++ b/Open-ILS/src/templates/opac/parts/header.tt2 @@ -19,7 +19,7 @@ # parts/searchbar.tt2, and results.tt2. show_detail_view = 0; IF CGI.param("detail_record_view").defined; - show_detail_view = CGI.param("detail_record_view"); + show_detail_view = CGI.param("detail_record_view") | html; ELSIF show_more_details.default == "true" OR show_more_details.default == "hide"; show_detail_view = 1; diff --git a/Open-ILS/src/templates/opac/parts/place_hold.tt2 b/Open-ILS/src/templates/opac/parts/place_hold.tt2 index 099208c950..9284362db2 100644 --- a/Open-ILS/src/templates/opac/parts/place_hold.tt2 +++ b/Open-ILS/src/templates/opac/parts/place_hold.tt2 @@ -189,7 +189,7 @@ function maybeToggleNumCopies(obj) { [% l('Advanced Hold Options') %] [% END %] [% IF CGI.param('hold_type') == 'M' AND CGI.param('bre_id') %] - + [% l('Basic Hold Options') %] diff --git a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 index 009145aeb2..2f434bdc60 100644 --- a/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 +++ b/Open-ILS/src/templates/opac/parts/place_hold_result.tt2 @@ -148,10 +148,10 @@ function disable_submit() { [% END %] [% IF any_failures OR ctx.general_hold_error %] - [% l('Cancel') %] + [% l('Cancel') %] [% ELSE %]