dcd1f5d48c
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>
131 lines
5.6 KiB
Text
131 lines
5.6 KiB
Text
[% USE Koha %]
|
|
[% USE Branches %]
|
|
[% USE KohaDates %]
|
|
[% USE Price %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Summary for [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="pat_moremember-print" class="pat">
|
|
<div id="main">
|
|
<h3><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=[% patron.cardnumber | html %]">Account summary: [% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])</a></h3>
|
|
|
|
<ul>
|
|
[% IF Koha.Preference( 'AddressFormat' ) %]
|
|
[% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
|
|
[% ELSE %]
|
|
[% INCLUDE 'member-display-address-style-us.inc' %]
|
|
[% END %]
|
|
<li>[% IF ( patron.phone ) %][% patron.phone | html %][% ELSE %](no phone number on file)[% END %]</li>
|
|
<li>[% IF ( patron.email ) %][% patron.email | html %][% ELSE %](no primary email on file)[% END %]</li>
|
|
[% IF ( patron.emailpro ) %]
|
|
<li>[% patron.emailpro | html %]</li>
|
|
[% END %]
|
|
<li>Registration date: [% patron.dateenrolled | $KohaDates %]</li>
|
|
<li>Expiration date: [% patron.dateexpiry | $KohaDates %]</li>
|
|
<li>Library: [% Branches.GetName( patron.branchcode ) | html %]</li>
|
|
<li>Category: [% patron.category.description | html %]</li>
|
|
</ul>
|
|
|
|
[% IF ( issues ) %]
|
|
<table>
|
|
<caption>Items checked out</caption>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Author</th>
|
|
<th>Call no</th>
|
|
<th>Item type</th>
|
|
<th>Date due</th>
|
|
<th>Barcode</th>
|
|
<th>Charge</th>
|
|
<th>Price</th>
|
|
<th>Status</th>
|
|
</tr>
|
|
|
|
[% FOREACH issue IN issues %]
|
|
[% IF ( issue.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
|
|
<td>
|
|
[% issue.title | html %]
|
|
<a href="/cgi-bin/koha/catalogue/detail.pl?item=[% issue.itemnumber | html %]&biblionumber=[% issue.biblionumber | html %]&bi=[% issue.biblioitemnumber | html %]"></a>
|
|
</td>
|
|
<td>[% issue.author | html %]</td>
|
|
<td>[% issue.itemcallnumber | html %]</td>
|
|
<td>[% issue.itemtype_description | html %]</td>
|
|
<td>[% issue.date_due | $KohaDates as_due_date => 1 | html %]</td>
|
|
<td>[% issue.barcode | html %]</td>
|
|
<td>[% issue.charge | html %]</td>
|
|
<td>[% issue.replacementprice | html %]</td>
|
|
<td>[% IF ( issue.overdue ) %]Overdue![% ELSE %] [% END %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
<tr>
|
|
<td colspan="6" style="text-align: right; font-weight:bold;">Totals:</td>
|
|
<td>[% totaldue | html %]</td>
|
|
<td>[% totalprice | html %]</td>
|
|
<td colspan="3"> </td>
|
|
</tr>
|
|
</table>
|
|
[% END %]
|
|
|
|
[% IF ( reserves ) %]
|
|
<table>
|
|
<caption>Pending holds</caption>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>Author</th>
|
|
<th>Placed on</th>
|
|
<th>Expires on</th>
|
|
<th>Pick up location</th>
|
|
</tr>
|
|
|
|
[% FOREACH reserve IN reserves %]
|
|
<tr>
|
|
<td>[% reserve.title | html %]</td>
|
|
<td>[% reserve.author | html %]</td>
|
|
<td>[% reserve.reservedate | $KohaDates %]</td>
|
|
<td>[% reserve.expirationdate | $KohaDates %]</td>
|
|
<td>[% reserve.waiting_at | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
</table>
|
|
[% END %]
|
|
[% IF accounts && totaldue != 0 %]
|
|
<table>
|
|
<caption>Account fines and payments</caption>
|
|
<tr>
|
|
<th>Description of charges</th>
|
|
<th>Date</th>
|
|
<th>Amount</th>
|
|
<th>Outstanding</th>
|
|
</tr>
|
|
|
|
[% FOREACH account IN accounts %]
|
|
<tr>
|
|
<td>
|
|
[% IF ( account.itemnumber ) %]<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% account.item.biblionumber | html %]&itemnumber=[% account.itemnumber | html %]">[% END %]
|
|
[% account.description | html %] [% IF account.itemnumber AND account.accounttype != 'F' AND account.accounttype != 'FU' %] [% account.item.biblio.title | html %][% END %]
|
|
[% IF ( account.itemnumber ) %]</a>[% END %]
|
|
</td>
|
|
<td>[% account.date | $KohaDates %]</td>
|
|
<td style="text-align:right;">[% account.amount | $Price | html %]</td>
|
|
<td style="text-align:right;">[% account.amountoutstanding | $Price | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3">Total due</td>
|
|
<td colspan="2" style="text-align:right;">[% totaldue | $Price | html %]</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
[% END %]
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'slip-print.inc' #printThenClose %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|