Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1354)
+++ branches/2.8.x/CHANGELOG	(revision 1355)
@@ -11,11 +11,15 @@
 ! = Update/Change
 
 ------------------------------------- 2.8.2 -------------------------------------
+27 Dec-2010 Build 1355 Frank Heyne (FrankH)
+# security fix: remaining vulnerabilities mentioned in http://secunia.com/secunia_research/2010-90/
+# security fix: in path admin/templates/ - added FTAN check
+# security fix: in path admin/settings/ - added FTAN check
 26 Dec-2010 Dietmar Woellbrink (Luisehahne)
 + added admin/images
 # fixed save handling settings entries
 ! local sync
-26 Dec-2010 Frank Heyne (FrankH)
+26 Dec-2010 Build 1353 Frank Heyne (FrankH)
 # security fix: in modules/admin.php - check whether section belongs to page
 ! security fix: changed $section_required into $no_section_required (apparently used by no module at all)
 # security fix: in path admin/users/ - added FTAN check
Index: branches/2.8.x/wb/admin/templates/uninstall.php
===================================================================
--- branches/2.8.x/wb/admin/templates/uninstall.php	(revision 1354)
+++ branches/2.8.x/wb/admin/templates/uninstall.php	(revision 1355)
@@ -42,6 +42,12 @@
 require_once(WB_PATH.'/framework/class.admin.php');
 $admin = new admin('Addons', 'templates_uninstall');
 
+if( !$admin->checkFTAN() )
+{
+	$admin->print_error($MESSAGE['PAGES_NOT_SAVED'],'index.php');
+	exit();
+}
+
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
 
Index: branches/2.8.x/wb/admin/templates/details.php
===================================================================
--- branches/2.8.x/wb/admin/templates/details.php	(revision 1354)
+++ branches/2.8.x/wb/admin/templates/details.php	(revision 1355)
@@ -29,6 +29,12 @@
 require_once(WB_PATH.'/framework/class.admin.php');
 $admin = new admin('Addons', 'templates_view',false);
 
+if( !$admin->checkFTAN() )
+{
+	$admin->print_error($MESSAGE['PAGES_NOT_SAVED'],'index.php');
+	exit();
+}
+
 // Get template name
 if(!isset($_POST['file']) OR $_POST['file'] == "") {
 	header("Location: index.php");
@@ -50,6 +56,7 @@
 $template = new Template(THEME_PATH.'/templates');
 $template->set_file('page', 'templates_details.htt');
 $template->set_block('page', 'main_block', 'main');
+$template->set_var('FTAN', $admin->getFTAN());
 
 // Insert values
 $result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template' AND directory = '$file'");
Index: branches/2.8.x/wb/admin/templates/install.php
===================================================================
--- branches/2.8.x/wb/admin/templates/install.php	(revision 1354)
+++ branches/2.8.x/wb/admin/templates/install.php	(revision 1355)
@@ -37,6 +37,12 @@
 require_once(WB_PATH.'/framework/class.admin.php');
 $admin = new admin('Addons', 'templates_install');
 
+if( !$admin->checkFTAN() )
+{
+	$admin->print_error($MESSAGE['PAGES_NOT_SAVED'],'index.php');
+	exit();
+}
+
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
 
Index: branches/2.8.x/wb/admin/templates/index.php
===================================================================
--- branches/2.8.x/wb/admin/templates/index.php	(revision 1354)
+++ branches/2.8.x/wb/admin/templates/index.php	(revision 1355)
@@ -32,6 +32,7 @@
 $template = new Template(THEME_PATH.'/templates');
 $template->set_file('page', 'templates.htt');
 $template->set_block('page', 'main_block', 'main');
+$template->set_var('FTAN', $admin->getFTAN());
 
 // Insert values into template list
 $template->set_block('main_block', 'template_list_block', 'template_list');
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1354)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1355)
@@ -52,6 +52,6 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.2.RC1');
-if(!defined('REVISION')) define('REVISION', '1354');
+if(!defined('REVISION')) define('REVISION', '1355');
 
 ?>
\ No newline at end of file
Index: branches/2.8.x/wb/admin/settings/save.php
===================================================================
--- branches/2.8.x/wb/admin/settings/save.php	(revision 1354)
+++ branches/2.8.x/wb/admin/settings/save.php	(revision 1355)
@@ -34,6 +34,12 @@
 	$admin = new admin('Settings', 'settings_advanced');
 }
 
+if( !$admin->checkFTAN() )
+{
+	$admin->print_error($MESSAGE['PAGES_NOT_SAVED'],'index.php');
+	exit();
+}
+
 // Create a javascript back link
 $js_back = "javascript: history.go(-1);";
 
Index: branches/2.8.x/wb/admin/settings/index.php
===================================================================
--- branches/2.8.x/wb/admin/settings/index.php	(revision 1354)
+++ branches/2.8.x/wb/admin/settings/index.php	(revision 1355)
@@ -35,6 +35,7 @@
 
 $template->set_file('page',        'settings.htt');
 $template->set_block('page',       'main_block', 'main');
+$template->set_var('FTAN', $admin->getFTAN());
 
 $template->set_block('main_block', 'template_list_block',         'template_list');
 $template->set_block('main_block', 'timezone_list_block',         'timezone_list');
Index: branches/2.8.x/wb/templates/wb_theme/templates/templates.htt
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/templates/templates.htt	(revision 1354)
+++ branches/2.8.x/wb/templates/wb_theme/templates/templates.htt	(revision 1355)
@@ -8,6 +8,7 @@
 {CHANGE_TEMPLATE_NOTICE}<br /><br />
 
 <form name="install" enctype="multipart/form-data" action="install.php" method="post" class="{DISPLAY_INSTALL}">
+{FTAN}
 
 <h2>{HEADING_INSTALL_TEMPLATE}</h2>
 
@@ -30,6 +31,7 @@
 </form>
 
 <form name="uninstall" action="uninstall.php" method="post" class="{DISPLAY_UNINSTALL}">
+{FTAN}
 
 <h2>{HEADING_UNINSTALL_TEMPLATE}</h2>
 
@@ -54,6 +56,7 @@
 </form>
 
 <form name="details" action="details.php" method="post" class="{DISPLAY_LIST}">
+{FTAN}
 
 <h2>{HEADING_TEMPLATE_DETAILS}</h2>
 
Index: branches/2.8.x/wb/templates/wb_theme/templates/settings.htt
===================================================================
--- branches/2.8.x/wb/templates/wb_theme/templates/settings.htt	(revision 1354)
+++ branches/2.8.x/wb/templates/wb_theme/templates/settings.htt	(revision 1355)
@@ -2,6 +2,7 @@
 
 <form name="settings" action="save.php" method="post">
 <input type="hidden" name="advanced" value="{ADVANCED}" />
+{FTAN}
 
 <table cellpadding="3" cellspacing="0" border="0" align="center" width="100%" class="settings_table">
 <tr>
Index: branches/2.8.x/wb/templates/argos_theme/templates/settings.htt
===================================================================
--- branches/2.8.x/wb/templates/argos_theme/templates/settings.htt	(revision 1354)
+++ branches/2.8.x/wb/templates/argos_theme/templates/settings.htt	(revision 1355)
@@ -2,6 +2,7 @@
 
 <form name="settings" action="save.php" method="post">
 <input type="hidden" name="advanced" value="{ADVANCED}" />
+{FTAN}
 
 <table cellpadding="3" cellspacing="0" border="0" align="center" width="100%" class="settings_table">
 <tr>
Index: branches/2.8.x/wb/templates/argos_theme/templates/templates.htt
===================================================================
--- branches/2.8.x/wb/templates/argos_theme/templates/templates.htt	(revision 1354)
+++ branches/2.8.x/wb/templates/argos_theme/templates/templates.htt	(revision 1355)
@@ -14,6 +14,7 @@
 </table>
 
 <form name="install" enctype="multipart/form-data" action="install.php" method="post" class="{DISPLAY_INSTALL}">
+{FTAN}
 
 <h2>{HEADING_INSTALL_TEMPLATE}</h2>
 
@@ -36,6 +37,7 @@
 </form>
 
 <form name="uninstall" action="uninstall.php" method="post" class="{DISPLAY_UNINSTALL}">
+{FTAN}
 
 <h2>{HEADING_UNINSTALL_TEMPLATE}</h2>
 
@@ -60,6 +62,7 @@
 </form>
 
 <form name="details" action="details.php" method="post" class="{DISPLAY_LIST}">
+{FTAN}
 
 <h2>{HEADING_TEMPLATE_DETAILS}</h2>
 
Index: branches/2.8.x/wb/modules/form/save_field.php
===================================================================
--- branches/2.8.x/wb/modules/form/save_field.php	(revision 1354)
+++ branches/2.8.x/wb/modules/form/save_field.php	(revision 1355)
@@ -46,9 +46,9 @@
 if($admin->get_post('title') == '' OR $admin->get_post('type') == '') {
 	$admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/form/modify_field.php?page_id='.$page_id.'&section_id='.$section_id.'&field_id='.$field_id);
 } else {
-	$title = $admin->add_slashes($admin->get_post('title'));
+	$title = htmlspecialchars($admin->get_post_escaped('title'), ENT_QUOTES);
 	$type = $admin->add_slashes($admin->get_post('type'));
-	$required = $admin->add_slashes($admin->get_post('required'));
+	$required = (int) $admin->add_slashes($admin->get_post('required'));
 }
 $value = '';
 
