Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Mar 2015 at 19:15 UTC
Updated:
12 Jul 2022 at 16:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wim leersComment #2
aspilicious commentedSounds sane, looks OK
Comment #3
berdirMakes me wonder which of those issues we should consider as a backport for D7. Most don't make sense there, but this one might?
Comment #4
wim leersI didn't check, but I'd assume this is already the case in D7. I just checked
user_pass_reset()(inuser.pages.inc), and apparently that's not the case. Great find.Comment #5
fabianx commentedRTBC + 1
Comment #6
webchickGiven this is a legit bug fix, and it also is aiming to be backported to D7, let's get a test for this.
Comment #7
cilefen commentedAdded a test.
Comment #8
cilefen commentedThat test is for the wrong route.
Comment #10
cilefen commentedComment #11
wim leersTest looks great.
Comment #12
alexpottThis issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 9a0cea2 and pushed to 8.0.x. Thanks!
Comment #14
berdirComment #15
sivaji_ganesh_jojodae commentedPatch for D7 attached.
Comment #19
fabianx commentedThis should use:
drupal_page_is_cacheable(FALSE);
instead of setting $conf directly ...
Comment #20
jeroentMade changes as suggested by #19.
Comment #21
fabianx commented#20: Can you upload the a test-only patch as well, please.
I want to make sure it fails ...
You likely will need to enable page cache for it to work though ...
Comment #24
poker10 commentedI think this D7 part of this issue is no longer relevant, as the cache of the
user_pass_reset()form was "turned off" in: #2803921: A valid one-time login link may be leaked by the referer header to 3rd partiesThe form is not cached in browser:
And it also does not have
X-Drupal-Cacheheader, because the user has$_SESSION['pass_reset_hash']set and thus Drupal is adding also$_COOKIE[session_name()]for that user, which causes the part where theX-Drupal-Cacheheader should be set to skip.See:
_drupal_bootstrap_page_cache()Verified also by manual testing that there is no
X-Drupal-Cacheheader on that form at all. So I think this can be closed now as fixed in D8 and thats all.