* Displays the options page. Pulls from proper user preference files
* and config.php. Displays preferences as selected and other options.
*
- * @copyright © 1999-2009 The SquirrelMail Project Team
+ * @copyright 1999-2010 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
/* get the globals that we may need */
sqgetGlobalVar('optpage', $optpage);
-sqgetGlobalVar('optmode', $optmode, SQ_FORM);
-sqgetGlobalVar('optpage_data',$optpage_data, SQ_POST);
+sqgetGlobalVar('optmode', $optmode, SQ_FORM);
+sqgetGlobalVar('optpage_data',$optpage_data, SQ_POST);
+sqgetGlobalVar('smtoken', $submitted_token, SQ_FORM, '');
/* end of getting globals */
/* Make sure we have an Option Page set. Default to main. */
/*** Next, process anything that needs to be processed. ***/
/***********************************************************/
+// security check before saving anything...
+//FIXME: what about SMOPT_MODE_LINK??
+if ($optmode == SMOPT_MODE_SUBMIT) {
+ sm_validate_security_token($submitted_token, 3600, TRUE);
+}
+
$optpage_save_error=array();
if ( isset( $optpage_data ) ) {
}
// Begin output form
- echo addForm('options.php', 'post', 'option_form')
+ echo addForm('options.php', 'post', 'option_form', '', '', array(), TRUE)
. create_optpage_element($optpage)
. create_optmode_element(SMOPT_MODE_SUBMIT);