diff --git a/setup/index.php b/setup/index.php index 3b4082b614..0573e827d1 100644 --- a/setup/index.php +++ b/setup/index.php @@ -247,6 +247,7 @@ switch($GLOBALS['egw_info']['setup']['stage']['db']) $setup_tpl->set_var('V_db_filled_block',$db_filled_block); break; 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('automatic',lang('We will automatically update your tables/records to %1',$setup_info['phpgwapi']['version'])); $setup_tpl->set_var('backupwarn',lang('but we highly recommend backing up your tables in case the script causes damage to your data.
These automated scripts can easily destroy your data.')); @@ -341,6 +342,7 @@ switch($GLOBALS['egw_info']['setup']['stage']['db']) } break; case 'oldversion': + egw_csrf::validate($_POST['csrf_token'], __FILE__); // create a backup, before upgrading the tables if ($_POST['backup']) { diff --git a/setup/templates/default/setup_db_blocks.tpl b/setup/templates/default/setup_db_blocks.tpl index 4e35d758af..159ed11a11 100644 --- a/setup/templates/default/setup_db_blocks.tpl +++ b/setup/templates/default/setup_db_blocks.tpl @@ -92,6 +92,7 @@ {automatic} {backupwarn}
+ {hidden_vars} @@ -108,25 +109,17 @@

{dont_touch_my_data}.  {goto}: -
- +
-
- +
-
- - -
-
- +
-
- - + +