X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fchange_password%2Ffunctions.php;h=0ab38fc100a4dbc0c2752ca6a9fd304016b1bb37;hb=e7d5ff29db69101e42cd491d2fa42d4f83cd35a4;hp=25d59a66003e5386d7374b51fd558f9dc954e9ca;hpb=4b4abf93a9624311afef0c385023724ee46a2b60;p=squirrelmail.git diff --git a/plugins/change_password/functions.php b/plugins/change_password/functions.php index 25d59a66..0ab38fc1 100644 --- a/plugins/change_password/functions.php +++ b/plugins/change_password/functions.php @@ -3,7 +3,7 @@ /** * functions.php - Change Password plugin * - * @copyright © 2003-2005 The SquirrelMail Project Team + * @copyright 2003-2017 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins @@ -85,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 */ @@ -101,12 +101,11 @@ function cpw_do_change() $onetimepad = OneTimePadCreate(strlen($newpw)); 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