Provide View Unsafe Images link on viewing a text/html attachment.
[squirrelmail.git] / plugins / change_password / functions.php
index 5272d6f7bf35786bbe2fb40fb8447dae11168f38..a0cd81dc6187426581c5f70e3db34f74231acfa3 100644 (file)
@@ -3,9 +3,8 @@
 /**
  * functions.php - Change Password plugin
  *
- * Copyright (c) 2003-2004 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
+ * @copyright © 2003-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package plugins
  * @subpackage change_password
@@ -15,7 +14,7 @@
  * Will verify the input against a set of criteria:
  * is every field supplied, does verify password match,
  * does current password validate, ..
- * These criteria are (for now) backend-independant.
+ * These criteria are (for now) backend-independent.
  *
  * @return array Array with zero or more error messages.
  */
@@ -100,12 +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);
 
     /* make sure we write the session data before we redirect */
     session_write_close();
-    header('Location: '.SM_PATH. 'src/options.php?optmode=submit&plugin_change_password=1');
+    header('Location: '.SM_PATH. 'src/options.php?optmode=submit&optpage=change_password&plugin_change_password=1');
     exit;
 }
+