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>
68 lines
3 KiB
Text
68 lines
3 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Acquisition › Cancel order</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="acq_cancelorder" class="acq">
|
|
[% INCLUDE 'header.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
|
|
<a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
|
|
<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% basket.bookseller.id | html %]">[% basket.bookseller.name | html %]</a> ›
|
|
<a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | html %]">Basket [% basket.basketname | html %] ([% basket.basketno | html %]) for [% basket.bookseller.name | html %]</a> ›
|
|
Cancel order
|
|
</div>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
|
|
|
|
[% UNLESS ( confirmcancel ) %]
|
|
<form method="post" action="">
|
|
<div class="dialog alert">
|
|
<h3>Are you sure you want to cancel this order ([% ordernumber | html %])</h3>
|
|
<p>
|
|
[% IF (del_biblio) %]
|
|
Bibliographic record will be deleted too.
|
|
[% ELSE %]
|
|
Bibliographic record will not be deleted.
|
|
[% END %]
|
|
</p>
|
|
<p>
|
|
[% PROCESS 'av-build-dropbox.inc' name="reason", category="ORDER_CANCELLATION_REASON" default="0" %]
|
|
</p>
|
|
<input type="hidden" name="action" value="confirmcancel" />
|
|
<input type="hidden" value="[% ordernumber | html %]" name="ordernumber" />
|
|
<input type="hidden" value="[% biblionumber | html %]" name="biblionumber" />
|
|
<input type="hidden" value="[% basket.basketno | html %]" name="basketno" />
|
|
<input type="hidden" value="[% referrer | html %]" name="referrer" />
|
|
[% IF (del_biblio) %]
|
|
<input type="hidden" value="1" name="del_biblio" />
|
|
[% END %]
|
|
<button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, cancel (Y)</button>
|
|
<button class="deny" accesskey="n" onclick="window.location='[% referrer | html %]';return false;"><i class="fa fa-fw fa-remove"></i> No, don't cancel (N)</button>
|
|
</div>
|
|
</form>
|
|
[% ELSE %]
|
|
[% IF ( success_cancelorder ) %]
|
|
<div class="dialog message">
|
|
The order has been successfully cancelled
|
|
[% ELSE %]
|
|
<div class="dialog alert">
|
|
An error has occurred.
|
|
[% IF ( error_delitem ) %]
|
|
<p>The order has been cancelled, although one or more items could not have been deleted.</p>
|
|
[% END %]
|
|
[% IF ( error_delbiblio ) %]
|
|
<p>The order has been cancelled, although the record has not been deleted.</p>
|
|
[% END %]
|
|
[% END %]
|
|
<p><a href="[% referrer | html %]">OK</a></p>
|
|
</div>
|
|
[% END %]
|
|
|
|
</div>
|
|
</div>
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|