From: Dan Scott Date: Wed, 26 Apr 2017 04:19:42 +0000 (-0400) Subject: LP#1478128: Avoid XSS in public catalog X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=472bd5ae1486fc0349581b02e666d0e8b8d5c143;p=contrib%2FConifer.git 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 Conflicts: Open-ILS/src/templates/opac/parts/searchbar.tt2 Signed-off-by: Galen Charlton --- 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 20088fa93b..1b368ff230 100644 --- a/Open-ILS/src/templates/opac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2 @@ -90,9 +90,9 @@ number_of_expert_rows = CGI.param('tag').list.size; index = 0; WHILE index < number_of_expert_rows %] - - - + + + [% index = index + 1; %] [% END %] [% END %]