magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

Customer Login Page is incorrectly cached with private data if Magento Captcha isn't enabled #39318

Open collymore opened 1 hour ago

collymore commented 1 hour ago

Preconditions and environment

Steps to reproduce

Expected result

The page returns FPC MISS.

The customer account form is using private data e.g The current Customer Email address is output in the forms login field" and this shouldn't be cached.

Actual result

The page response is returned with a Full page cache HIT.

If visiting the page after a cache clear and logged in, the email will be cached on the page for all subsequent requests.

Additional information

The only reason that the Customer Account Login page is not cached by default is the Magento_Captcha module's layout customer_account_login.xml file.

This is adding a bock name="captcha" to the container name="form.additional.info".
That block has cacheable="false" declared which then stops the login page from being cached.

Without this module activate nothing else is making the page non-cacheable.

Edit : This issue actually effects every Customer Account Form

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 hour ago

Hi @collymore. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.