Skip to content

Commit 035ed4e

Browse files
colinmollenhourfballiano
authored andcommitted
Merge pull request from GHSA-r3c9-9j5q-pwv4
1 parent 556cbe5 commit 035ed4e

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
@@ -842,6 +842,11 @@ public function resetPasswordAction()
842842
*/
843843
public function resetPasswordPostAction()
844844
{
845+
if (!$this->_validateFormKey()) {
846+
$this->_redirect('*/*/');
847+
return;
848+
}
849+
845850
list($customerId, $resetPasswordLinkToken) = $this->_getRestorePasswordParameters($this->_getSession());
846851
$password = (string)$this->getRequest()->getPost('password');
847852
$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)