/* make sure we write the session data before we redirect */
session_write_close();
- header('Location: '.SM_PATH. 'src/options.php?optmode=submit&optpage=change_password&plugin_change_password=1');
+ header('Location: '.SM_PATH. 'src/options.php?optmode=submit&optpage=change_password&plugin_change_password=1&smtoken=' . sm_generate_security_token());
exit;
}
/* the form was submitted, go for it */
if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) {
+
+ // security check
+ sqgetGlobalVar('smtoken', $submitted_token, SQ_POST, '');
+ sm_validate_security_token($submitted_token, 3600, TRUE);
+
/* perform basic checks */
$Messages = cpw_check_input();
?><tr><td>
<?php echo addForm($_SERVER['PHP_SELF'], 'post'); ?>
+ <input type="hidden" name="smtoken" value="<?php echo sm_generate_security_token() ?>" />
<table>
<tr>
<th align="right"><?php echo _("Current Password:")?></th>