From 17210e096b0009c4a891944085c5cdc33a100d9c Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Wed, 26 Apr 2017 00:19:42 -0400 Subject: [PATCH] LP#1478128: Avoid XSS in public catalog This patch escapes various GET param values by passing them through the Template Toolkit html filter, including: * in the locale picker * in the searchbar * in the login form Signed-off-by: Dan Scott Signed-off-by: Galen Charlton --- Open-ILS/src/templates/opac/parts/locale_picker.tt2 | 2 +- Open-ILS/src/templates/opac/parts/login/form.tt2 | 2 +- Open-ILS/src/templates/opac/parts/searchbar.tt2 | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/locale_picker.tt2 b/Open-ILS/src/templates/opac/parts/locale_picker.tt2 index 12019cdddd..2ba56c0350 100644 --- a/Open-ILS/src/templates/opac/parts/locale_picker.tt2 +++ b/Open-ILS/src/templates/opac/parts/locale_picker.tt2 @@ -10,7 +10,7 @@ [%- FOREACH param IN CGI.params(); -%] [%- NEXT IF param.key == 'set_eg_locale'; -%] - + [%- END; -%] + diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2 index ddf68cf3ec..587f485ea7 100644 --- a/Open-ILS/src/templates/opac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2 @@ -124,7 +124,7 @@ END; FOR p IN CGI.params.keys; NEXT UNLESS p.match('^fi:'); FOR pv IN CGI.params.$p; - %][% + %][% END; END; END %] @@ -133,9 +133,9 @@ END; number_of_expert_rows = CGI.param('tag').list.size; index = 0; WHILE index < number_of_expert_rows %] - - - + + + [% index = index + 1; %] [% END %] [% END %] -- 2.43.2