Retrieve parameters from $_POST in UserPassword class

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
Maurício Meneghini Fauth 2018-11-10 20:18:28 -02:00 committed by Isaac Bennetch
parent 8c30a63334
commit 3a0d1cef93

View File

@ -61,16 +61,16 @@ class UserPassword
$error = false;
$message = Message::success(__('The profile has been updated.'));
if (($_REQUEST['nopass'] != '1')) {
if (strlen($_REQUEST['pma_pw']) === 0 || strlen($_REQUEST['pma_pw2']) === 0) {
if (($_POST['nopass'] != '1')) {
if (strlen($_POST['pma_pw']) === 0 || strlen($_POST['pma_pw2']) === 0) {
$message = Message::error(__('The password is empty!'));
$error = true;
} elseif ($_REQUEST['pma_pw'] !== $_REQUEST['pma_pw2']) {
} elseif ($_POST['pma_pw'] !== $_POST['pma_pw2']) {
$message = Message::error(
__('The passwords aren\'t the same!')
);
$error = true;
} elseif (strlen($_REQUEST['pma_pw']) > 256) {
} elseif (strlen($_POST['pma_pw']) > 256) {
$message = Message::error(__('Password is too long!'));
$error = true;
}
@ -98,10 +98,10 @@ class UserPassword
$serverType = Util::getServerType();
$serverVersion = $GLOBALS['dbi']->getVersion();
if (isset($_REQUEST['authentication_plugin'])
&& ! empty($_REQUEST['authentication_plugin'])
if (isset($_POST['authentication_plugin'])
&& ! empty($_POST['authentication_plugin'])
) {
$orig_auth_plugin = $_REQUEST['authentication_plugin'];
$orig_auth_plugin = $_POST['authentication_plugin'];
} else {
$orig_auth_plugin = Privileges::getCurrentAuthenticationPlugin(
'change', $username, $hostname
@ -152,7 +152,7 @@ class UserPassword
private function changePassHashingFunction()
{
if (Core::isValid(
$_REQUEST['authentication_plugin'], 'identical', 'mysql_old_password'
$_POST['authentication_plugin'], 'identical', 'mysql_old_password'
)) {
$hashing_function = 'OLD_PASSWORD';
} else {