X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fchange_password%2Foptions.php;h=b09bb9381c28c4b589449e302986c029930272a0;hp=f621f3289d512ffc8d3d62ddd4c00f79b27ffe52;hb=a564b9e3f94dcd52acd4133c84de9cac3da3cab6;hpb=c683d87f10ef8febd3a5228e80d5ebc7b46343d8 diff --git a/plugins/change_password/options.php b/plugins/change_password/options.php index f621f328..b09bb938 100644 --- a/plugins/change_password/options.php +++ b/plugins/change_password/options.php @@ -3,18 +3,18 @@ /** * options.php - Change Password HTML page * - * Copyright (c) 2004-2005 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. - * + * @copyright 2004-2017 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins * @subpackage change_password */ -/** @ignore */ -define('SM_PATH','../../'); +/** + * Include the SquirrelMail initialization file. + */ +require('../../include/init.php'); -include_once (SM_PATH . 'include/validate.php'); include_once (SM_PATH . 'plugins/change_password/functions.php'); include_once (SM_PATH . 'functions/forms.php'); @@ -54,11 +54,9 @@ if (file_exists(SM_PATH . 'plugins/change_password/backend/'.$cpw_backend.'.php' /* the form was submitted, go for it */ if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) { - // SM14 code: use change_password gettext domain binding for 1.4.x - if (! check_sm_version(1,5,0)) { - bindtextdomain('change_password',SM_PATH . 'locale'); - textdomain('change_password'); - } + // security check + sqgetGlobalVar('smtoken', $submitted_token, SQ_POST, ''); + sm_validate_security_token($submitted_token, -1, TRUE); /* perform basic checks */ $Messages = cpw_check_input(); @@ -67,41 +65,30 @@ if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) { if(count($Messages) == 0) { $Messages = cpw_do_change(); } - - // SM14 code: use change_password gettext domain binding for 1.4.x - if (! check_sm_version(1,5,0)) { - bindtextdomain('squirrelmail',SM_PATH . 'locale'); - textdomain('squirrelmail'); - } } -displayPageHeader($color, 'None'); - -// SM14 code: use change_password gettext domain binding for 1.4.x -if (! check_sm_version(1,5,0)) { - bindtextdomain('change_password',SM_PATH . 'locale'); - textdomain('change_password'); -} +displayPageHeader($color); -do_hook('change_password_init'); +do_hook('change_password_init', $null); ?>
0) { echo "\n"; } ?> -
-
+
\n"; foreach ($Messages as $line) { - echo htmlspecialchars($line) . "
\n"; + echo sm_encode_html_special_chars($line) . "
\n"; } echo "
+ @@ -122,5 +109,5 @@ if (isset($Messages) && count($Messages) > 0) {
- \ No newline at end of file + +