Correct encoding in MemberLoginForm->forgotPassword() URLs (fixes #6126)

This commit is contained in:
Ingo Schommer 2013-04-05 11:14:45 +02:00
parent 35b6887568
commit 97819b3f21

View File

@ -252,7 +252,7 @@ JS
$SQL_data = Convert::raw2sql($data);
$SQL_email = $SQL_data['Email'];
$member = DataObject::get_one('Member', "\"Email\" = '{$SQL_email}'");
if($member) {
$token = $member->generateAutologinTokenAndStoreHash();
@ -263,12 +263,12 @@ JS
));
$e->setTo($member->Email);
$e->send();
$this->controller->redirect('Security/passwordsent/' . urlencode($data['Email']));
} elseif($data['Email']) {
// Avoid information disclosure by displaying the same status,
// regardless wether the email address actually exists
$this->controller->redirect('Security/passwordsent/' . urlencode($data['Email']));
// Avoid information disclosure by displaying the same status,
// regardless wether the email address actually exists
$this->controller->redirect('Security/passwordsent/' . rawurlencode($data['Email']));
} else {
$this->sessionMessage(
_t('Member.ENTEREMAIL', 'Please enter an email address to get a password reset link.'),
@ -276,7 +276,7 @@ JS
);
$this->controller->redirect('Security/lostpassword');
}
}
}
}