mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
prevent false CSRF warning, if DB schema upgrade is needed
This commit is contained in:
parent
8da996500f
commit
c96111fbca
@ -247,6 +247,7 @@ switch($GLOBALS['egw_info']['setup']['stage']['db'])
|
|||||||
$setup_tpl->set_var('V_db_filled_block',$db_filled_block);
|
$setup_tpl->set_var('V_db_filled_block',$db_filled_block);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
$setup_tpl->set_var('hidden_vars', html::input_hidden('csrf_token', egw_csrf::token(__FILE__)));
|
||||||
$setup_tpl->set_var('oldver',lang('You appear to be running version %1 of eGroupWare',$setup_info['phpgwapi']['currentver']));
|
$setup_tpl->set_var('oldver',lang('You appear to be running version %1 of eGroupWare',$setup_info['phpgwapi']['currentver']));
|
||||||
$setup_tpl->set_var('automatic',lang('We will automatically update your tables/records to %1',$setup_info['phpgwapi']['version']));
|
$setup_tpl->set_var('automatic',lang('We will automatically update your tables/records to %1',$setup_info['phpgwapi']['version']));
|
||||||
$setup_tpl->set_var('backupwarn',lang('but we <u>highly recommend backing up</u> your tables in case the script causes damage to your data.<br /><strong>These automated scripts can easily destroy your data.</strong>'));
|
$setup_tpl->set_var('backupwarn',lang('but we <u>highly recommend backing up</u> your tables in case the script causes damage to your data.<br /><strong>These automated scripts can easily destroy your data.</strong>'));
|
||||||
@ -342,6 +343,7 @@ switch($GLOBALS['egw_info']['setup']['stage']['db'])
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'oldversion':
|
case 'oldversion':
|
||||||
|
egw_csrf::validate($_POST['csrf_token'], __FILE__);
|
||||||
// create a backup, before upgrading the tables
|
// create a backup, before upgrading the tables
|
||||||
if ($_POST['backup'])
|
if ($_POST['backup'])
|
||||||
{
|
{
|
||||||
|
@ -91,6 +91,7 @@
|
|||||||
{automatic}
|
{automatic}
|
||||||
{backupwarn}<br />
|
{backupwarn}<br />
|
||||||
<form method="post" action="index.php">
|
<form method="post" action="index.php">
|
||||||
|
{hidden_vars}
|
||||||
<input type="hidden" name="oldversion" value="{oldver}" />
|
<input type="hidden" name="oldversion" value="{oldver}" />
|
||||||
<input type="hidden" name="useglobalconfigsettings" />
|
<input type="hidden" name="useglobalconfigsettings" />
|
||||||
<input type="hidden" name="action" value="Upgrade" />
|
<input type="hidden" name="action" value="Upgrade" />
|
||||||
@ -107,24 +108,20 @@
|
|||||||
</form>
|
</form>
|
||||||
<hr />
|
<hr />
|
||||||
{dont_touch_my_data}. {goto}:
|
{dont_touch_my_data}. {goto}:
|
||||||
<form method="post" action="config.php">
|
<form method="get" action="config.php">
|
||||||
<input type="hidden" name="action" value="Dont touch my data" />
|
|
||||||
<input type="submit" name="label" value="{configuration}" />
|
<input type="submit" name="label" value="{configuration}" />
|
||||||
</form>
|
</form>
|
||||||
<form method="post" action="admin_account.php">
|
<form method="get" action="admin_account.php">
|
||||||
<input type="hidden" name="action" value="Dont touch my data" />
|
|
||||||
<input type="submit" name="label" value="{admin_account}" />
|
<input type="submit" name="label" value="{admin_account}" />
|
||||||
</form>
|
</form>
|
||||||
<form method="post" action="lang.php">
|
<form method="get" action="lang.php">
|
||||||
<input type="hidden" name="action" value="Dont touch my data" />
|
<input type="hidden" name="action" value="Dont touch my data" />
|
||||||
<input type="submit" name="label" value="{language_management}" />
|
<input type="submit" name="label" value="{language_management}" />
|
||||||
</form>
|
</form>
|
||||||
<form method="post" action="applications.php">
|
<form method="get" action="applications.php">
|
||||||
<input type="hidden" name="action" value="Dont touch my data" />
|
|
||||||
<input type="submit" name="label" value="{applications}" />
|
<input type="submit" name="label" value="{applications}" />
|
||||||
</form>
|
</form>
|
||||||
<form method="post" action="db_backup.php">
|
<form method="get" action="db_backup.php">
|
||||||
<input type="hidden" name="action" value="Dont touch my data" />
|
|
||||||
<input type="submit" name="label" value="{db_backup}" />
|
<input type="submit" name="label" value="{db_backup}" />
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user