Bug 14418: XSS Vulnerabilities in OPAC search
Fix for /cgi-bin/koha/opac-search.pl
To test
1/ Hit /cgi-bin/koha/opac-search.pl?tag="><script
src='http://cst.sba-research.org/x.js'/>&q=a
2/ Notice the js is executed
3/ Apply patch
4/ Reload page, notice it is no longer executed
5/ Test the rss links work still
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Confirmed bug and that the patch fixes it.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit 45dd775401)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
afb00d1390
commit
21cc992e7e
|
|
@ -16,7 +16,7 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<link rel="alternate" type="application/rss+xml" title="[% LibraryName |html %] Search RSS feed" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |uri %]&count=[% countrss |uri %]&sort_by=acqdate_dsc&format=rss2" />
|
||||
<link rel="alternate" type="application/rss+xml" title="[% LibraryName |html %] Search RSS feed" href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi | uri %][% limit_cgi |uri %]&count=[% countrss |uri %]&sort_by=acqdate_dsc&format=rss2" />
|
||||
</head>
|
||||
|
||||
[% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %]
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
<strong>No results found!</strong>
|
||||
<p>
|
||||
[% IF ( searchdesc ) %]
|
||||
No results found for that in [% LibraryName %] catalog. <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi | html | url %]&format=rss2" class="rsssearchlink noprint"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" class="rsssearchicon"/></a>
|
||||
No results found for that in [% LibraryName %] catalog. <a href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi | uri %][% limit_cgi | html | url %]&format=rss2" class="rsssearchlink noprint"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" border="0" class="rsssearchicon"/></a>
|
||||
[% ELSE %]
|
||||
You did not specify any search criteria.
|
||||
[% END %]
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
[% END %]
|
||||
).
|
||||
[% END %]
|
||||
<a href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html | url %]&count=[% countrss |html %]&sort_by=acqdate_dsc&format=rss2" class="rsssearchlink noprint"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a>
|
||||
<a href="[% OPACBaseURL %]/cgi-bin/koha/opac-search.pl?[% query_cgi | uri %][% limit_cgi |html | url %]&count=[% countrss |html %]&sort_by=acqdate_dsc&format=rss2" class="rsssearchlink noprint"><img src="[% interface %]/[% theme %]/images/feed-icon-16x16.png" alt="Subscribe to this search" title="Subscribe to this search" class="rsssearchicon"/></a>
|
||||
[% END # / IF total %]
|
||||
</p>
|
||||
[% END # / IF searchdesc %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue