Commit 09ece320 authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Mathias Brodala
Browse files

[TASK] Store System Maintenance tokens in data attributes

The tokens used in the System Maintenance area are stored in hidden
`<div>` elements, which is syntactically wrong and considered bad
practice.
Instead, the tokens are now stored in data attributes.

Resolves: #85455
Releases: master
Change-Id: I3a3be24897caa56c20355f0d36c7e7c4ae702640
Reviewed-on: https://review.typo3.org/57451


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Mathias Brodala's avatarMathias Brodala <mbrodala@pagemachine.de>
Tested-by: Mathias Brodala's avatarMathias Brodala <mbrodala@pagemachine.de>
parent cd1dad8e
<div style="display:none;">
<div id="t3js-presets-getContent-token">{presetGetContentToken}</div>
</div>
<div class="t3js-presets-content"></div>
......@@ -18,26 +18,25 @@
</li>
</ul>
<div style="display:none">
<div id="t3js-mailTest-token">{mailTestToken}</div>
</div>
<div class="t3js-module-content" data-mail-test-token="{mailTestToken}">
<div class="t3js-mailTest-output"></div>
<div class="t3js-mailTest-output"></div>
<form id="t3js-mailTest-form">
<div class="form-group">
<label for="t3-install-checkmail">Email address:</label>
<input
id="t3-install-checkmail"
type="email"
class="t3-install-form-input-text form-control t3js-mailTest-email"
required
/>
</div>
<button
class="btn btn-default"
type="submit"
>
Send test mail
</button>
</form>
<form id="t3js-mailTest-form">
<div class="form-group">
<label for="t3-install-checkmail">Email address:</label>
<input
id="t3-install-checkmail"
type="email"
class="t3-install-form-input-text form-control t3js-mailTest-email"
required
/>
</div>
<button
class="btn btn-default"
type="submit"
>
Send test mail
</button>
</form>
</div>
<div style="display: none;">
<div id="t3js-installer-databaseData-execute-token">{executeDatabaseDataToken}</div>
</div>
<h3>Create Administrative User / Specify Site Name</h3>
<div class="t3js-module-content" data-installer-database-data-execute-token="{executeDatabaseDataToken}">
<h3>Create Administrative User / Specify Site Name</h3>
<p>
Use this account to log into the backend of your site.
</p>
<p>
The password you provide for this account is also used to access the <strong>Install Tool</strong>.
</p>
<p>
On this page you can also set a name for your new website.
</p>
<p>
Use this account to log into the backend of your site.
</p>
<p>
The password you provide for this account is also used to access the <strong>Install Tool</strong>.
</p>
<p>
On this page you can also set a name for your new website.
</p>
<div class="t3js-installer-databaseData-output"></div>
<div class="t3js-installer-databaseData-output"></div>
<div class="row">
<div class="col-md-6">
<form method="post" id="stepInstaller-databaseData" class="t3-install-form-label-before form-horizontal">
<input type="hidden" value="execute" name="install[set]" />
<div class="form-group">
<label for="password" class="control-label col-md-2">Username</label>
<div class="col-md-10">
<input
class="t3-install-form-input-text form-control"
name="install[values][username]"
id="username"
placeholder="admin"
autocomplete="off"
/>
<div class="row">
<div class="col-md-6">
<form method="post" id="stepInstaller-databaseData" class="t3-install-form-label-before form-horizontal">
<input type="hidden" value="execute" name="install[set]" />
<div class="form-group">
<label for="password" class="control-label col-md-2">Username</label>
<div class="col-md-10">
<input
class="t3-install-form-input-text form-control"
name="install[values][username]"
id="username"
placeholder="admin"
autocomplete="off"
/>
</div>
</div>
</div>
<div class="form-group">
<label for="password" class="control-label col-md-2">Password</label>
<div class="col-md-10">
<input
class="t3-install-form-input-text t3-install-form-password-strength form-control"
name="install[values][password]"
id="password"
type="password"
autocomplete="off"
/>
<div class="checkbox">
<label>
<input
type="checkbox"
id="show-password"
onchange="if (this.checked==true) { document.getElementById('password').type='text'; } else { document.getElementById('password').type='password'; }"
/>
Show password
</label>
<div class="form-group">
<label for="password" class="control-label col-md-2">Password</label>
<div class="col-md-10">
<input
class="t3-install-form-input-text t3-install-form-password-strength form-control"
name="install[values][password]"
id="password"
type="password"
autocomplete="off"
/>
<div class="checkbox">
<label>
<input
type="checkbox"
id="show-password"
onchange="if (this.checked==true) { document.getElementById('password').type='text'; } else { document.getElementById('password').type='password'; }"
/>
Show password
</label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-10">
<div class="alert alert-warning">
If compromised, this account will provide an attacker with complete access to your installation. A strong password is recommended. Include lower and upper case characters, special characters and numbers. Your password must be at least eight characters long.
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-10">
<div class="alert alert-warning">
If compromised, this account will provide an attacker with complete access to your installation. A strong password is recommended. Include lower and upper case characters, special characters and numbers. Your password must be at least eight characters long.
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="form-group">
<label for="sitename" class="control-label col-md-2">Site name</label>
<div class="col-md-10">
<label for="sitename" class="control-label col-md-2">Site name</label>
<div class="col-md-10">
<input
class="t3-install-form-input-text form-control"
name="install[values][sitename]"
id="sitename"
type="text"
value="{siteName}"
/>
<input
class="t3-install-form-input-text form-control"
name="install[values][sitename]"
id="sitename"
type="text"
value="{siteName}"
/>
</div>
</div>
</div>
<button class="btn btn-success t3js-installer-databaseData-execute">
Continue
</button>
</form>
<button class="btn btn-success t3js-installer-databaseData-execute">
Continue
</button>
</form>
</div>
</div>
</div>
<div style="display: none;">
<div id="t3js-installer-databaseSelect-execute-token">{executeDatabaseSelectToken}</div>
</div>
<h3>Select a database</h3>
<div class="t3js-module-content" data-installer-database-select-execute-token="{executeDatabaseSelectToken}">
<h3>Select a database</h3>
<div class="t3js-installer-databaseSelect-output"></div>
<div class="t3js-installer-databaseSelect-output"></div>
<f:if condition="{errors -> f:count()}">
<f:for each="{errors}" as="error">
<div class="alert alert-danger">
<h4>Exception</h4>
<p>{error}</p>
</div>
</f:for>
</f:if>
<form method="post" id="stepInstaller-databaseSelect">
<div class="row">
<div class="col-md-6">
<div class="radio">
<label for="t3-install-form-db-select-type-existing">
<input id="t3-install-form-db-select-type-existing" type="radio" name="install[values][type]" value="existing" class="radio" checked="checked" />
Use an existing empty database:
</label>
</div>
<div class="form-group">
<select
id="t3-install-step-database-existing"
name="install[values][existing]"
class="form-control"
onfocus="document.getElementById('t3-install-form-db-select-type-existing').checked=true;"
>
<option value="">-- Select database --</option>
<f:for each="{databaseList}" as="database">
<f:if condition="{database.tables}">
<f:then>
<option value="{database.name}" disabled="disabled">{database.name} ({database.tables} Tables)</option>
</f:then>
<f:else>
<option value="{database.name}">{database.name}</option>
</f:else>
</f:if>
</f:for>
</select>
<f:if condition="{errors -> f:count()}">
<f:for each="{errors}" as="error">
<div class="alert alert-danger">
<h4>Exception</h4>
<p>{error}</p>
</div>
<div class="radio">
<label for="t3-install-step-database-new">
</f:for>
</f:if>
<form method="post" id="stepInstaller-databaseSelect">
<div class="row">
<div class="col-md-6">
<div class="radio">
<label for="t3-install-form-db-select-type-existing">
<input id="t3-install-form-db-select-type-existing" type="radio" name="install[values][type]" value="existing" class="radio" checked="checked" />
Use an existing empty database:
</label>
</div>
<div class="form-group">
<select
id="t3-install-step-database-existing"
name="install[values][existing]"
class="form-control"
onfocus="document.getElementById('t3-install-form-db-select-type-existing').checked=true;"
>
<option value="">-- Select database --</option>
<f:for each="{databaseList}" as="database">
<f:if condition="{database.tables}">
<f:then>
<option value="{database.name}" disabled="disabled">{database.name} ({database.tables} Tables)</option>
</f:then>
<f:else>
<option value="{database.name}">{database.name}</option>
</f:else>
</f:if>
</f:for>
</select>
</div>
<div class="radio">
<label for="t3-install-step-database-new">
<input
id="t3-install-form-db-select-type-new"
type="radio"
name="install[values][type]"
value="new"
class="radio"
/>
Create a new database:
</label>
</div>
<div class="form-group">
<p>
Specify a name for your TYPO3 database.
</p>
<input
id="t3-install-form-db-select-type-new"
type="radio"
name="install[values][type]"
value="new"
class="radio"
id="t3-install-step-database-new"
class="t3-install-form-input-text form-control"
type="text"
name="install[values][new]"
checked="checked"
onfocus="document.getElementById('t3-install-form-db-select-type-new').checked=true;"
/>
Create a new database:
</label>
</div>
<div class="form-group">
<p>
Specify a name for your TYPO3 database.
</p>
<input
id="t3-install-step-database-new"
class="t3-install-form-input-text form-control"
type="text"
name="install[values][new]"
checked="checked"
onfocus="document.getElementById('t3-install-form-db-select-type-new').checked=true;"
/>
</div>
</div>
<div class="form-group">
<button class="btn btn-success t3js-installer-databaseSelect-execute">
Continue
</button>
<div class="form-group">
<button class="btn btn-success t3js-installer-databaseSelect-execute">
Continue
</button>
</div>
</div>
</div>
</div>
</form>
</form>
</div>
<div style="display: none;">
<div id="t3js-installer-defaultConfiguration-execute-token">{executeDefaultConfigurationToken}</div>
</div>
<h3>Installation Complete</h3>
<div class="t3js-module-content" data-installer-default-configuration-execute-token="{executeDefaultConfigurationToken}">
<h3>Installation Complete</h3>
<p>
The Installation Wizard can create an empty page at the root of your website to help get you started. If you would like to use this option select "Create empty starting page".
</p>
<p>
The Installation Wizard can create an empty page at the root of your website to help get you started. If you would like to use this option select "Create empty starting page".
</p>
<div class="t3js-installer-defaultConfiguration-output"></div>
<div class="t3js-installer-defaultConfiguration-output"></div>
<f:if condition="!{composerMode}">
<div class="alert alert-notice">
<h4>Want a pre-configured site?</h4>
<p>
You currently have an empty installation of TYPO3. If you would like to view a list of pre-configured distributions select “download list of distributions” from the list below.
<strong>Note: This may take some time to load.</strong>
</p>
</div>
</f:if>
<f:if condition="!{composerMode}">
<div class="alert alert-notice">
<h4>Want a pre-configured site?</h4>
<p>
You currently have an empty installation of TYPO3. If you would like to view a list of pre-configured distributions select “download list of distributions” from the list below.
<strong>Note: This may take some time to load.</strong>
</p>
</div>
</f:if>
<form method="post">
<div class="form-group">
<f:if condition="!{composerMode}">
<form method="post">
<div class="form-group">
<f:if condition="!{composerMode}">
<div class="radio">
<label for="load-distributions">
<input type="radio" id="load-distributions" name="install[values][sitesetup]" value="loaddistribution" />
Yes, download the list of distributions
</label>
</div>
</f:if>
<div class="radio">
<label for="load-distributions">
<input type="radio" id="load-distributions" name="install[values][sitesetup]" value="loaddistribution" />
Yes, download the list of distributions
<label for="create-site">
<input type="radio" id="create-site" name="install[values][sitesetup]" value="createsite" />
Create empty starting page
</label>
</div>
<div class="radio">
<label for="do-nothing">
<input type="radio" id="do-nothing" name="install[values][sitesetup]" value="donothing" checked="checked" />
Take me straight to the backend
</label>
</div>
</f:if>
<div class="radio">
<label for="create-site">
<input type="radio" id="create-site" name="install[values][sitesetup]" value="createsite" />
Create empty starting page
</label>
</div>
<div class="radio">
<label for="do-nothing">
<input type="radio" id="do-nothing" name="install[values][sitesetup]" value="donothing" checked="checked" />
Take me straight to the backend
</label>
</div>
</div>
<button class="btn btn-success t3js-installer-defaultConfiguration-execute">
Open the TYPO3 Backend
</button>
</form>
<button class="btn btn-success t3js-installer-defaultConfiguration-execute">
Open the TYPO3 Backend
</button>
</form>
</div>
......@@ -9,31 +9,33 @@
You could log out all users, delete all their basket data, and lose logging information!
</p>
<div class="t3js-clearTables-output"></div>
<div class="t3js-module-content" data-clear-tables-clear-token="{clearTablesClearToken}">
<div class="t3js-clearTables-output"></div>
<button
class="btn btn-default t3js-clearTables-stats"
type="button"
>
Scan again
</button>
<hr>
<button
class="btn btn-default t3js-clearTables-stats"
type="button"
>
Scan again
</button>
<hr>
<div class="form-group">
<div class="t3js-clearTables-stat-container"></div>
</div>
<div class="form-group">
<div class="t3js-clearTables-stat-container"></div>
</div>
<div style="display:none;">
<div id="t3js-clearTables-clear-token">{clearTablesClearToken}</div>
<div class="t3js-clearTables-stat-template">
<p class="t3js-clearTables-stat-description">{clearTableStatistic.description}</p>
<button
class="btn btn-warning t3js-clearTables-clear"
type="button"
>
Delete <span class="t3js-clearTables-stat-rows"></span> rows
from table "<span class="t3js-clearTables-stat-name"></span>" table
</button>
<hr class="t3js-clearTables-stat-lastRuler">
<div style="display:none;">
<div class="t3js-clearTables-stat-template">
<p class="t3js-clearTables-stat-description">{clearTableStatistic.description}</p>
<button
class="btn btn-warning t3js-clearTables-clear"
type="button"
>
Delete <span class="t3js-clearTables-stat-rows"></span> rows
from table "<span class="t3js-clearTables-stat-name"></span>" table
</button>
<hr class="t3js-clearTables-stat-lastRuler">
</div>
</div>
</div>
<h4>About</h4>
<p>
TYPO3 stores processed files and cached images in a dedicated directory.
This directory is likely to grow quickly.
</p>
<p>
With this action you can delete the files in this folder. Afterwards, you
should also clear the cache database tables.
</p>
<p>
The File Abstraction Layer additionally stores a database record for every file
it needs to process. (e.g. image thumbnails). In case you modified some graphics
settings (All Configuration [GFX]) and you need all processed files to get regenerated,
you can use this tool to remove the "_processed_" ones.
</p>
<h4>About</h4>
<p>
TYPO3 stores processed files and cached images in a dedicated directory.
This directory is likely to grow quickly.
</p>
<p>
With this action you can delete the files in this folder. Afterwards, you
should also clear the cache database tables.
</p>
<p>
The File Abstraction Layer additionally stores a database record for every file
it needs to process. (e.g. image thumbnails). In case you modified some graphics
settings (All Configuration [GFX]) and you need all processed files to get regenerated,
you can use this tool to remove the "_processed_" ones.
</p>
<div class="t3js-module-content" data-clear-typo3temp-delete-token="{clearTypo3tempFilesToken}">
<div class="t3js-clearTypo3temp-output"></div>
<hr>
<div class="form-group">
<div class="t3js-clearTypo3temp-stat-container"></div>
</div>
<div class="form-group">
<div class="t3js-clearTypo3temp-stat-container"></div>
</div>
<div style="display:none;">
<div id="t3js-clearTypo3temp-delete-token" style="display:none;">{clearTypo3tempFilesToken}</div>
<div class="t3js-clearTypo3temp-stat-template">
<button
<div style="display:none;">
<div class="t3js-clearTypo3temp-stat-template">
<button
class="btn btn-warning t3js-clearTypo3temp-delete"
type="button"
>
Delete <span class="t3js-clearTypo3temp-stat-numberOfFiles"></span> files in
typo3temp/assets/<span class="t3js-clearTypo3temp-stat-directory"></span>
</button>
<hr class="t3js-clearTypo3temp-stat-lastRuler">
>
Delete <span class="t3js-clearTypo3temp-stat-numberOfFiles"></span> files in
typo3temp/assets/<span class="t3js-clearTypo3temp-stat-directory"></span>
</button>
<hr class="t3js-clearTypo3temp-stat-lastRuler">
</div>
</div>
</div>
<button
class="btn btn-default t3js-clearTypo3temp-stats"
type="button"