Bug 3652: XSS vulnerability in page numbering
authorChris Cormack <chrisc@catalyst.net.nz>
Tue, 9 Oct 2012 01:11:10 +0000 (14:11 +1300)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 12 Oct 2012 10:17:47 +0000 (12:17 +0200)
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Confirmed the problem with test plan on the bug and checked that
paging works correctly after the patch.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
koha-tmpl/opac-tmpl/prog/en/includes/page-numbers.inc

index 738c0c9..ff9b11c 100644 (file)
@@ -1,7 +1,6 @@
 [% IF ( PAGE_NUMBERS ) %]<div class="pages">
     <!-- Row of numbers corresponding to search result pages -->
-        [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">&lt;&lt; Previous</a>[% END %]
-    [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
+        [% IF ( previous_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% previous_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |htm l%][% END %]">&lt;&lt; Previous</a>[% END %]
+    [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %][% IF ( PAGE_NUMBER.highlight ) %]<span class="current">[% PAGE_NUMBER.pg %]</span>[% ELSE %]        <a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% PAGE_NUMBER.offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html%][% END %]">[% PAGE_NUMBER.pg %]</a>[% END %]
     [% END %]
-        [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by %][% END %]">Next &gt;&gt;</a>[% END %]
-</div>[% END %]
+        [% IF ( next_page_offset ) %]<a class="nav" href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %]&amp;offset=[% next_page_offset %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by |html %][% END %]">Next &gt;&gt;</a>[% END %] </div>[% END %]