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>
60 lines
2.6 KiB
Text
60 lines
2.6 KiB
Text
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
[% IF subscription %]
|
|
<title>Koha › Serials subscription renew #[% subscription.subscriptionid | html %]</title>
|
|
[% ELSE %]
|
|
<title>Koha › Serials subscription renew</title>
|
|
[% END %]
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="ser_subscription-renew" class="ser">
|
|
<div class="container-fluid">
|
|
|
|
[% IF op == 'renew' OR op =='multi_renew' %]
|
|
[% IF op == 'renew' %]
|
|
<span>Subscription renewed.<span>
|
|
[% ELSE %]
|
|
<span>Subscriptions renewed.<span>
|
|
[% END %]
|
|
|
|
<div id="closewindow">
|
|
<a class="btn btn-default btn-default close" href="#">Close</a>
|
|
</div>
|
|
[% ELSE %]
|
|
<div id="bd">
|
|
<form name="f" action="/cgi-bin/koha/serials/subscription-renew.pl" method="post">
|
|
<input type="hidden" name="op" value="renew" />
|
|
<input type="hidden" name="subscriptionid" value="[% subscription.subscriptionid | html %]" />
|
|
<fieldset class="rows"><legend>Subscription renewal for [% subscription.bibliotitle | html %]</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="startdate">Start date: </label>
|
|
<input type="text" size="10" id="startdate" name="startdate" value="[% startdate | html %]" class="datepicker"/>
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
<li><fieldset>
|
|
<legend>Subscription length:</legend>
|
|
<ol><li><label for="numberlength">Number of num:</label><input type="text" id="numberlength" name="numberlength" value="[% subscription.numberlength | html %]" /></li>
|
|
<li><label for="weeklength">Number of weeks: </label><input type="text" id="weeklength" name="weeklength" value="[% subscription.weeklength | html %]" /></li>
|
|
<li><label for="monthlength">Number of months: </label><input type="text" id="monthlength" name="monthlength" value="[% subscription.monthlength | html %]" /></li></ol></fieldset></li>
|
|
<li><label for="note">Note for the librarian that will manage your renewal request: </label>
|
|
<textarea name="note" id="note" rows="5" cols="50"></textarea></li></ol></fieldset>
|
|
<fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
|
|
</form>
|
|
[% END %]
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$(".close").on("click", function(e){
|
|
e.preventDefault();
|
|
window.opener.location.reload(false);
|
|
self.close();
|
|
});
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' popup_window=1 %]
|