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>
73 lines
5 KiB
Text
73 lines
5 KiB
Text
[% USE HtmlTags %]
|
|
[% INCLUDE 'doc-head-open.inc' %]<title>Koha › Web installer › Database settings</title>
|
|
[% INCLUDE 'installer-doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="installer" class="installer">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div id="installer-step2" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
|
|
|
|
<h1 id="logo"><a href="#">Koha</a></h1>
|
|
<h2>Web installer › Database settings</h2>
|
|
<h3>Database settings:</h3>
|
|
<ul>
|
|
<li><em>Database type: </em> [%- dbms | $HtmlTags tag=>'code' | html -%]</li>
|
|
<li><em>Database name: </em> [%- dbname | $HtmlTags tag=>'code' | html -%]</li>
|
|
<li><em>Database host: </em> [%- hostname | $HtmlTags tag=>'code' | html -%]</li>
|
|
<li><em>Database port: </em> [%- port| $HtmlTags tag=>'code' | html -%] (probably okay if blank)</li>
|
|
<li><em>Database user: </em> [%- user | $HtmlTags tag=>'code' | html -%]</li>
|
|
</ul>
|
|
|
|
[% IF ( dbconnection ) %]
|
|
<form name="checkdbparameters" method="post" action="install.pl">
|
|
[% IF ( checkdatabaseaccess ) %]
|
|
<div class="alert alert-success" role="alert"><p>Connection established.</p></div>
|
|
[% IF ( checkdatabasecreated ) %]
|
|
<ul>
|
|
<li>Database [% dbname | $HtmlTags tag=>'code' | html %] exists.</li>
|
|
[% IF ( checkgrantaccess ) %]
|
|
<li>User [% user | $HtmlTags tag=>'code' | html %] has all required privileges on database [% dbname | $HtmlTags tag=>'code' | html %].</li>
|
|
</ul>
|
|
[% ELSE %]
|
|
</ul>
|
|
<p class="error">User [% user | $HtmlTags tag=>'code' | html %] doesn't have enough privilege on database [% dbname | $HtmlTags tag=>'code' | html %].</p>
|
|
<p class="tip">Ask for or make a change in the user's privileges. User [% user | $HtmlTags tag=>'code' | html %] must have USAGE, INSERT, UPDATE, DELETE, DROP and CREATE privileges on database [% dbname | $HtmlTags tag=>'code' | html %].</p>
|
|
<p>Need help? See manual for [% IF ( mysql ) %]
|
|
<a href="http://dev.mysql.com/doc/refman/4.1/en/grant.html">MySQL</a>
|
|
[% ELSE %]
|
|
<a href="http://www.postgresql.org/docs/8.2/interactive/sql-createrole.html">PostgreSQL</a>
|
|
[% END %]
|
|
</p>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<div class="alert alert-danger" role="alert"><p>No database named [% dbname | $HtmlTags tag=>'code' | html %] detected.</p></div>
|
|
<p>Please create the database before continuing.</p>
|
|
[% END %]
|
|
[% ELSE %]
|
|
<div class="alert alert-warning" role="alert">[% error | html %] : [% message | html %]</div>
|
|
<div class="tip">
|
|
<ul>
|
|
<li>Check that your database is running.</li>
|
|
<li>Check your database settings in [% 'koha-conf.xml' | $HtmlTags Tag=>'code' %].</li>
|
|
<li>Check the hostname setting in [% INCLUDE txt_kohaconf_xml %]. Some database servers require [% '127.0.0.1' | $HtmlTags tag=>'code' | html %] rather than [% 'localhost' | $HtmlTags tag=>'code' | html %].</li>
|
|
</ul>
|
|
</div>
|
|
<p>Please correct these errors. <a href="/cgi-bin/koha/installer/install.pl">Then start the installer again.</a>
|
|
[% END %]
|
|
[% UNLESS ( error ) %]
|
|
<input type="hidden" name="step" value="3" />
|
|
<p><input value="Continue to the next step" class="btn btn-primary" type="submit" /></p>
|
|
[% END %]
|
|
</form>
|
|
[% ELSE %]
|
|
<form name="checkinformation" method="post" action="install.pl">
|
|
<input type="hidden" name="step" value="2" />
|
|
<input type="hidden" name="checkdb" value="1" />
|
|
<p><input value="Continue to the next step" class="btn btn-primary" type="submit" /> </p>
|
|
</form>
|
|
[% END # / IF dbconnection %]
|
|
</div> <!-- / #installer-step2 -->
|
|
</div> <!-- / .row -->
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|