Koha/koha-tmpl/intranet-tmpl/prog/en/modules/labels/spinelabel-print.tt
Amit Gupta c57d0b71c7 Bug 19050 - XSS Flaws in Quick spine label creator
1. Hit /cgi-bin/koha/labels/spinelabel-home.pl
2. Enter <IFRAME SRC="javascript:alert('XSS');"></IFRAME> barcode text box.
3. Notice the iframe is executed
4. Apply patch
5. Reload page, and enter iframe again on barcode text box.
6. Notice it is no longer executed

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-08-29 12:00:37 -03:00

43 lines
1.5 KiB
Text

<!DOCTYPE html>
[% IF ( bidi ) %]<html lang="[% lang %]" dir="[% bidi %]">[% ELSE %]<html lang="[% lang %]">[% END %]
<head>
<title>Koha &rsaquo; Tools &rsaquo; Spine labels</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/spinelabel.css" />
<style type="text/css">
@media print {
.noprint { display: none; }
}
</style>
[% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
[% IF ( IntranetUserJS ) %]
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="[% interface %]/lib/jquery/jquery-migrate-1.3.0.min.js"></script>
<script type="text/javascript">
//<![CDATA[
[% IntranetUserJS %]
//]]>
</script>
[% END %]
</head>
[% IF ( BarcodeNotFound ) %]
<body id="labels_spinelabel-print" class="tools labels">
<p>The barcode [% Barcode |html %] was not found.</p>
<p><a href="spinelabel-home.pl">Return to spine label printer</a></p>
</body>
[% ELSE %]
[% IF ( autoprint ) %]
<body id="labels_spinelabel-print" class="tools labels" onload="window.print()">
[% ELSE %]
<body id="labels_spinelabel-print" class="tools labels">
[% END %]
<span id="spinelabel" class="label">
[% content %]
</span>
<span id="print_button" class="noprint">
<button onclick="window.print()">Print this label</button>
</span>
</body>
[% END %]
</html>