Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt
Jonathan Druart dcd1f5d48c Bug 13618: Add html filters to all the variables
Here we go, next step then.
As we did not fix the performance issue when autofiltering
the variables (see bug 20975), the only solution we have is to add the
filters explicitely.

This patch has been autogenerated (using add_html_filters.pl, see next
pathces) and add the html filter to all the variables displayed in the
template.
Exceptions are made (using the new 'raw' TT filter) to the variable we
already listed in the previous versions of this patch.

To test:
- Use t/db_dependent/Koha/Patrons.t to populate your DB with autogenerated
data which contain <script> tags

- Remove them from borrower_debarments.comments (there are allowed here)
update  borrower_debarments set comment="html tags possible here";

- From the interface hit page and try to catch alert box.
If you find one it means you find a possible XSS.
To know where it comes from:
* note the exact URL where you found it
* note the alert box content
* Dump your DB and search for the string in the dump to identify its
location (for instance table.field)

Next:
* Ideally we would like to use the raw filter when it is not necessary
to HTML escape the variables (in big loop for instance)
* Provide a QA script to catch missing filters (we want html, uri, url
or raw, certainly others that I am forgetting now)
* Replace the html filters with uri when needed (!)

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-08-17 15:55:05 +00:00

142 lines
6.7 KiB
Text

[% USE Koha %]
[% USE Branches %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="circ_circulation-home" class="circ">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; Circulation</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-5 col-md-4">
<h3>Circulation</h3>
<ul class="buttons-list">
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/circulation.pl"><i class="fa fa-upload"></i> Check out</a>
</li>
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/returns.pl"><i class="fa fa-download"></i> Check in</a>
</li>
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/renew.pl"><i class="fa fa-retweet"></i> Renew</a>
</li>
[% UNLESS IndependentBranches %]
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/selectbranchprinter.pl"><i class="fa fa-home"></i> Set library</a>
</li>
[% END %]
[% IF ( fast_cataloging ) %]
[% IF ( CAN_user_editcatalogue_fast_cataloging ) %]
<li>
<a class="circ-button" href="/cgi-bin/koha/cataloguing/addbiblio.pl?frameworkcode=FA"><i class="fa fa-plus"></i> Fast cataloging</a>
</li>
[% END %]
[% END %]
[% IF ( Koha.Preference('AllowCheckoutNotes') && CAN_user_circulate_manage_checkout_notes ) %]
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/checkout-notes.pl"><i class="fa fa-sticky-note"></i> Checkout notes</a>
</li>
[% END %]
</ul>
</div>
<div class="col-sm-5 col-md-4">
<h3>Holds</h3>
<ul class="buttons-list">
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/view_holdsqueue.pl"><i class="fa fa-tasks"></i> Holds queue</a>
</li>
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/pendingreserves.pl"><i class="fa fa-hand-grab-o"></i> Holds to pull</a>
</li>
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/waitingreserves.pl"><i class="fa fa-calendar"></i> Holds awaiting pickup</a>
</li>
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/reserveratios.pl"><i class="fa fa-line-chart"></i> Hold ratios</a>
</li>
</ul>
</div>
<!-- Add the extra clearfix for only the required viewport -->
<div class="clearfix visible-sm-block"></div>
<div class="col-sm-5 col-md-4">
[% IF Koha.Preference('ArticleRequests') %]
<h3>Patron request</h3>
<ul class="buttons-list">
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/article-requests.pl" title="Article requests"><i class="fa fa-newspaper-o"></i> Article requests</a>
</li>
</ul>
[% END %]
<h3>Transfers</h3>
<ul class="buttons-list">
[% IF Branches.InIndependentBranchesMode %]
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/branchtransfers.pl"><i class="fa fa-exchange"></i> Transfer</a>
</li>
[% END %]
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/transferstoreceive.pl"><i class="fa fa-sign-in"></i> Transfers to receive</a>
</li>
</ul>
<h3>Overdues</h3>
<ul class="buttons-list">
[% IF ( CAN_user_circulate_overdues_report ) %]
<li>
<a class="circ-button"
href="/cgi-bin/koha/circ/overdue.pl"
title="Warning: This report is very resource intensive on systems with large numbers of overdue items."
><i class="fa fa-clock-o"></i> Overdues</a>
</li>
[% END %]
<li>
<a class="circ-button"
href="/cgi-bin/koha/circ/branchoverdues.pl"
title="Limited to your library. See report help for other details."
><i class="fa fa-clock-o"></i> Overdues with fines</a>
</li>
[% IF Koha.Preference('OnSiteCheckouts') %]
<li>
<a class="circ-button" href="/cgi-bin/koha/circ/on-site_checkouts.pl">Pending on-site checkouts</a>
</li>
[% END %]
</ul>
</div>
</div>
<div class="row" id="intranet-circulation-home-html">
<div class="col-md-12">
[% Koha.Preference('IntranetCirculationHomeHTML') | html %]
</div>
</div>
<div class="row" id="offline-circulation">
<div class="col-md-12">
<h4>Offline circulation</h4>
<div class="col-sm-5 col-md-3">
[% IF (AllowOfflineCirculation) %]
<a href="/cgi-bin/koha/circ/offline.pl">Built-in offline circulation interface</a>
[% END %]
<p><a href="/cgi-bin/koha/offline_circ/process_koc.pl">Upload offline circulation file (.koc)</a></p>
<p><a href="/cgi-bin/koha/offline_circ/list.pl">Pending offline circulation actions</a></p>
</div>
<div class="col-sm-5 col-md-3">
<p><a href="https://github.com/bywatersolutions/koha-offline-circulation/releases"><i class="fa fa-window-maximize"></i> Get desktop application</a></p>
<p><a href="https://addons.mozilla.org/[% lang | html %]/firefox/addon/koct/"><i class="fa fa-firefox"></i> Get Firefox add-on</a></p>
</div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]