Bug 14360: Unescaped variable causes alert
Adding |html to [% resultsperpage %] to escape the variable and get rid of the alert. To test: 1) Go to URL such as ... /cgi-bin/koha/opac-authorities-home.pl?op=do_search&resultsperpage=1%22%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E 2) Notice pop-up box with alert 3) Apply patch, refresh page 4) Notice alert is gone Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> (cherry picked from commit9e920f7479) Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> (cherry picked from commitff0281d40a) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Conflicts: koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt
This commit is contained in:
parent
3e6ad12ee8
commit
47daa3e4a8
|
|
@ -6,7 +6,7 @@
|
|||
<ul>
|
||||
[% IF ( displayprev ) %]
|
||||
<li>
|
||||
<a href="opac-authorities-home.pl?startfrom=[% startfromprev %]&[% FOREACH searchdat IN searchdata %][% searchdat.term %]=[% searchdat.val |url %]&[% END %]resultsperpage=[% resultsperpage %]&type=opac&op=do_search&authtypecode=[% authtypecode %]&orderby=[% orderby %]">
|
||||
<a href="opac-authorities-home.pl?startfrom=[% startfromprev %]&[% FOREACH searchdat IN searchdata %][% searchdat.term %]=[% searchdat.val |url %]&[% END %]resultsperpage=[% resultsperpage |html %]&type=opac&op=do_search&authtypecode=[% authtypecode %]&orderby=[% orderby|html %]">
|
||||
«
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -15,12 +15,12 @@
|
|||
[% IF ( number.highlight ) %]
|
||||
<li class="active"><a href="#">[% number.number %]</a></li>
|
||||
[% ELSE %]
|
||||
<li><a href="opac-authorities-home.pl?startfrom=[% number.startfrom %]&[% FOREACH searchdat IN number.searchdata %][% searchdat.term %]=[% searchdat.val |url %]&[% END %]resultsperpage=[% resultsperpage %]&type=opac&op=do_search&authtypecode=[% authtypecode %]&orderby=[% orderby %]">[% number.number %]</a></li>
|
||||
<li><a href="opac-authorities-home.pl?startfrom=[% number.startfrom %]&[% FOREACH searchdat IN number.searchdata %][% searchdat.term %]=[% searchdat.val |url %]&[% END %]resultsperpage=[% resultsperpage |html %]&type=opac&op=do_search&authtypecode=[% authtypecode %]&orderby=[% orderby|html %]">[% number.number %]</a></li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF ( displaynext ) %]
|
||||
<li>
|
||||
<a href="opac-authorities-home.pl?startfrom=[% startfromnext %]&[% FOREACH searchdat IN searchdata %][% searchdat.term %]=[% searchdat.val |url %]&[% END %]&resultsperpage=[% resultsperpage %]&type=opac&op=do_search&authtypecode=[% authtypecode %]&orderby=[% orderby %]">»</a>
|
||||
<a href="opac-authorities-home.pl?startfrom=[% startfromnext %]&[% FOREACH searchdat IN searchdata %][% searchdat.term %]=[% searchdat.val |url %]&[% END %]&resultsperpage=[% resultsperpage |html %]&type=opac&op=do_search&authtypecode=[% authtypecode %]&orderby=[% orderby|html %]">»</a>
|
||||
</li>
|
||||
[% END %]
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Reference in New Issue