Skip to content

Commit

Permalink
Merge pull request from GHSA-r3c9-9j5q-pwv4
Browse files Browse the repository at this point in the history
  • Loading branch information
colinmollenhour authored Jan 26, 2023
1 parent df0ebab commit 58e72cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/code/core/Mage/Customer/controllers/AccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,11 @@ public function resetPasswordAction()
*/
public function resetPasswordPostAction()
{
if (!$this->_validateFormKey()) {
$this->_redirect('*/*/');
return;
}

list($customerId, $resetPasswordLinkToken) = $this->_getRestorePasswordParameters($this->_getSession());
$password = (string)$this->getRequest()->getPost('password');
$passwordConfirmation = (string)$this->getRequest()->getPost('confirmation');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</div>
<?php echo $this->getMessagesBlock()->toHtml(); ?>
<form action="<?php echo $this->getUrl('*/*/resetpasswordpost'); ?>" method="post" id="form-validate">
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>" />
<div class="fieldset" style="margin-top: 70px;">
<ul class="form-list">
<li class="fields">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</div>
<?php echo $this->getMessagesBlock()->toHtml(); ?>
<form action="<?php echo $this->getUrl('*/*/resetpasswordpost'); ?>" method="post" id="form-validate" class="scaffold-form">
<input name="form_key" type="hidden" value="<?php echo $this->getFormKey(); ?>" />
<div class="fieldset" style="margin-top: 70px;">
<p class="required"><?php echo $this->__('* Required Fields'); ?></p>
<ul class="form-list">
Expand Down

0 comments on commit 58e72cf

Please sign in to comment.