Resolving SUPEE 6788 Password Reset Issue
The Magento SUPEE 6788 patch, released to address critical security vulnerabilities (APPSEC-1027), introduced an issue where the password reset page becomes blank after the update.
Understanding the Problem
The patch enhances the security of the password reset process by adding a form key to certain pages. However, if your custom theme or template does not include this form key, the password reset page will display as a blank white screen instead of showing the reset password form.
Previously, the password reset URL was /customer/account/resetpassword/, and it functioned correctly. After applying SUPEE 6788, the URL changes to /customer/account/changeforgotten/, but without the necessary form key in your custom template files, it fails to render the reset form.
Resolving the Blank Page Issue
To fix this issue and make the password reset page show up again after installing SUPEE 6788, you need to update your custom template files to include the required form key. Here’s a step-by-step guide:
Step 1: Locate the Relevant Template Files
The template files that need updating are typically located in your theme directory under app/design/frontend/{your_vendor}/{your_theme}/template/customer/form/.
Look for the following two files:
resetforgottenpassword.phtmlregister.phtml
Step 2: Add the Form Key
Open each file and look for the <form> element. You should add the following line inside the opening <form> tag:
<%- form_html_id %><div class="field required" id="form_key_field"><label for="form_key" class="required"><em>*</em>Form Key:</label><input name="form_key" id="form_key" value="<%- form_key %>" type="hidden"></div>
This code adds a hidden input field named form_key with the actual key value populated dynamically.
Step 3: Save and Test
Save both files, then clear your Magento cache by running:
php bin/magento cache:flush
Now, initiate a password reset process from the frontend. You should see that the password reset page now displays without being blank, with the form fields available for you to fill in.
Conclusion
The blank screen issue after applying SUPEE 6788 is caused by a missing form key in your custom template files. By adding this form key and ensuring it matches the one added by the patch, you can successfully resolve the problem and restore functionality to the password reset feature.
Remember, when working with Magento security patches like SUPEE 6788, it’s crucial to thoroughly test your store after each update to ensure all features remain functional. If you’re ever unsure about how to implement a specific change or need further assistance, don’t hesitate to contact our expert Magento development team at Laravel Company.