Skip to content

Commit 58e72cf

Browse files
Merge pull request from GHSA-r3c9-9j5q-pwv4
1 parent df0ebab commit 58e72cf

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

app/code/core/Mage/Customer/controllers/AccountController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,11 @@ public function resetPasswordAction()
843843
*/
844844
public function resetPasswordPostAction()
845845
{
846+
if (!$this->_validateFormKey()) {
847+
$this->_redirect('*/*/');
848+
return;
849+
}
850+
846851
list($customerId, $resetPasswordLinkToken) = $this->_getRestorePasswordParameters($this->_getSession());
847852
$password = (string)$this->getRequest()->getPost('password');
848853
$passwordConfirmation = (string)$this->getRequest()->getPost('confirmation');

app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</div>
2424
<?php echo $this->getMessagesBlock()->toHtml(); ?>
2525
<form action="<?php echo $this->getUrl('*/*/resetpasswordpost'); ?>" method="post" id="form-validate">
26+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>" />
2627
<div class="fieldset" style="margin-top: 70px;">
2728
<ul class="form-list">
2829
<li class="fields">

app/design/frontend/rwd/default/template/customer/form/resetforgottenpassword.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</div>
2424
<?php echo $this->getMessagesBlock()->toHtml(); ?>
2525
<form action="<?php echo $this->getUrl('*/*/resetpasswordpost'); ?>" method="post" id="form-validate" class="scaffold-form">
26+
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>" />
2627
<div class="fieldset" style="margin-top: 70px;">
2728
<p class="required"><?php echo $this->__('* Required Fields'); ?></p>
2829
<ul class="form-list">

0 commit comments

Comments
 (0)