X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fchange_password%2Ffunctions.php;h=788a0fb0c23b33bfae001e9fa8339f1d94408fce;hp=09d0cd455667d8d8a6be9a9bf9bf537ff198d63d;hb=6d9f22dba5d50ff55b8d6811412feedd3e534acf;hpb=aaa0101813394ef6cb50a5db1dd1d31c2dc00921;ds=sidebyside diff --git a/plugins/change_password/functions.php b/plugins/change_password/functions.php index 09d0cd45..788a0fb0 100644 --- a/plugins/change_password/functions.php +++ b/plugins/change_password/functions.php @@ -3,9 +3,8 @@ /** * functions.php - Change Password plugin * - * Copyright (c) 2003-2005 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * + * @copyright 2003-2010 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins * @subpackage change_password @@ -86,11 +85,11 @@ function cpw_do_change() require_once(SM_PATH . 'plugins/change_password/backend/'.$cpw_backend.'.php'); - $msgs = do_hook_function('change_password_dochange', - array ( - 'username' => $username, - 'curpw' => $curpw, - 'newpw' => $newpw + $msgs = do_hook('change_password_dochange', + $temp=array ( + 'username' => &$username, + 'curpw' => &$curpw, + 'newpw' => &$newpw ) ); /* something bad happened, return */ @@ -100,14 +99,13 @@ function cpw_do_change() /* update our password stored in the session */ $onetimepad = OneTimePadCreate(strlen($newpw)); - $_SESSION['onetimepad'] = $onetimepad; + sqsession_register($onetimepad,'onetimepad'); $key = OneTimePadEncrypt($newpw, $onetimepad); - setcookie('key', $key, 0, $base_uri); + sqsetcookie('key', $key, 0, $base_uri); /* 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; } -?> \ No newline at end of file