Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
Jonathan Druart dcd1f5d48c Bug 13618: Add html filters to all the variables
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>
2018-08-17 15:55:05 +00:00

67 lines
2.7 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] &rsaquo; Self checkout help</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Koha [% Version | html %]" /> <!-- leave this for stats -->
<link rel="shortcut icon" href="[% IF ( OpacFavicon ) %][% OpacFavicon | html %][% ELSE %][% interface | html %]/[% theme | html %]/images/favicon.ico[% END %]" type="image/x-icon" />
[% Asset.css("lib/bootstrap/css/bootstrap.min.css") | $raw %]
[% Asset.css("lib/jquery/jquery-ui.css") | $raw %]
[% Asset.css("css/sco.css") | $raw %]
[% IF ( OPACUserCSS ) %]<style>[% OPACUserCSS | $raw %]</style>[% END %]
[% IF ( SCOUserCSS ) %]<style>[% SCOUserCSS | $raw %]</style>[% END %]
<!--[if lt IE 9]>
<script src="[% interface | html %]/[% theme | html %]/lib/respond.min.js"></script>
<![endif]-->
<script>
function _(s) { return s } // dummy function for gettext
</script>
[% Asset.js("lib/modernizr.min.js") | $raw %]
</head>
<body id="sco_help" class="sco">
[% INCLUDE 'masthead-sco.inc' %]
<div class="main">
<div class="container-fluid">
<div class="row-fluid">
<h1>Self checkout help</h1>
[% IF ( SelfCheckHelpMessage ) %]
<div id="selfcheckhelpmessage">
[% SelfCheckHelpMessage | $raw %]
</div>
[% END %]
<p>If this is your first time using the self checkout system, or if the system
is not behaving as expected, you may want to refer to this guide to get
yourself started.</p>
<h3>Step one: Enter your user id[% IF ( SelfCheckoutByLogin ) %] and password[% END %]</h3>
<p>Enter your User ID[% IF ( SelfCheckoutByLogin ) %] and password[% END %], and click the
submit button (or press the enter key).</p>
<h3>Step two: Scan the barcode for each item, one at a time</h3>
<p>Scan each item and wait for the page to reload before scanning the next item.
The checked-out item should appear in your checkouts list.
The Submit button only needs to be clicked if you enter the barcode manually.</p>
<h3>Step three: Click the 'Finish' button</h3>
<p>If you do not click the 'Finish' button, your session will automatically expire in
[% SelfCheckTimeout | html %] seconds.</p>
<div class="button">
<a href="javascript:history.go(-1)">Return to the self-checkout</a>
</div>
</div> <!-- / #showreviews -->
</div> <!-- / .span10/12 -->
</div> <!-- / .row-fluid -->
</div> <!-- / .container-fluid -->
</div> <!-- / .main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% IF ( SCOUserJS ) %]<script>[% SCOUserJS | $raw %]</script>[% END %]
[% END %]