Opened 7 months ago
Last modified 7 months ago
#22328 new enhancement
Pass reset password URI to retrieve_password_message filter
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Users | Version: | 2.8 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
The arguments for the <code>retrieve_password_message</code> filter are the message itself and the reset key. However the URI requires the user login as well in order to be valid, thus we cannot regenerate the password reset link without it.
Proposed solution - pass the reset URI instead of just the key.
Attachments (1)
Change History (6)
comment:1
follow-up:
↓ 2
SergeyBiryukov — 7 months ago
comment:2
in reply to:
↑ 1
;
follow-up:
↓ 3
ejdanderson — 7 months ago
- Summary changed from Unable to regenerate reset password URI from filter argumetns to Unable to regenerate reset password URI from filter arguments
Replying to SergeyBiryukov:
In order to keep backwards compatibility, $reset_url should be added as a new parameter rather than replace an existing one.
I thought about this, and thought - who would be using just the key in their filter? The only reasoning I could come up with is that they're using it in a regex match to extract the URL, but that seemed somewhat unlikely as easier patterns can be derived.
comment:3
in reply to:
↑ 2
;
follow-up:
↓ 4
SergeyBiryukov — 7 months ago
Replying to ejdanderson:
I thought about this, and thought - who would be using just the key in their filter?
It's actually possible to reconstruct the URI using just the key.
See sb_we_lost_password_message() in SB Welcome Email Editor plugin.
ejdanderson — 7 months ago
comment:4
in reply to:
↑ 3
ejdanderson — 7 months ago
Replying to SergeyBiryukov:
It's actually possible to reconstruct the URI using just the key.
See sb_we_lost_password_message() in SB Welcome Email Editor plugin.
This makes sense. I've updated the patch to reflect this and just pass the $reset_url as another parameter.
comment:5
SergeyBiryukov — 7 months ago
- Summary changed from Unable to regenerate reset password URI from filter arguments to Pass reset password URI to retrieve_password_message filter
- Type changed from defect (bug) to enhancement

In order to keep backwards compatibility, $reset_url should be added as a new parameter rather than replace an existing one.