mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Correct encoding in MemberLoginForm->forgotPassword() URLs (fixes #6126)
This commit is contained in:
parent
35b6887568
commit
97819b3f21
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user