Bug 19086: Fix Stored XSS in circulation.pl

1/ To test add a message to a borrower that contains js
2/ hit /cgi-bin/koha/circ/circulation.pl?borrowernumber=[number]
  where number is the borrowernumber of the borrower you set the message
  for
3/ Notice js is execute
4/ Apply patch, reload, js is escaped

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Chris Cormack 2017-08-11 19:54:34 +00:00 committed by Jonathan Druart
parent c176b8ceef
commit 50dcae4b50

View file

@ -906,7 +906,7 @@ No patron matched <span class="ex">[% message | html %]</span>
[% IF message.manager_id %]
( <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% message.manager_id %]">[% message.get_column('manager_firstname') %] [% message.get_column('manager_surname') %]</a> )
[% END %]
<i>"[% message.message %]"</i>
<i>"[% message.message | html %]"</i>
</span>
[% IF message.branchcode == branch OR Koha.Preference('AllowAllMessageDeletion') %]
<a class="btn btn-link btn-sm" href="/cgi-bin/koha/circ/del_message.pl?message_id=[% message.message_id %]&amp;borrowernumber=[% message.borrowernumber %]" onclick="return confirm(MSG_CONFIRM_DELETE_MESSAGE);"><i class="fa fa-trash"></i> Delete</a>