LG-13138 Avoid sending account reset notification on duplicate submission#12205
Conversation
d992300 to
65053f0
Compare
|
looks good can u add a test |
There was a problem hiding this comment.
Mentioned here, but I think a more comprehensive mitigation is needed based on reading the ticket
There was a problem hiding this comment.
I have added rate limiting with d4577ff
I left in the UI change so I think unless they have JS turned off they'll never hit the rate limit but it's there as an additional stopgap.
ecfe2f2 to
d4577ff
Compare
|
1543f16 to
3d21240
Compare
There was a problem hiding this comment.
what happens if account reset request isnt created? right now it looks like we take them to account reset confirm, this could cause confusion for users that may hit this limit naturally especially if its 2 requests per 2 days.
There was a problem hiding this comment.
I set the limiter to 2 minutes because the real world thing this is trying to prevent (the controller not POSTing in time with button mashing) I expect should be over by then. 542a916
3d21240 to
8c32a87
Compare
config/application.yml.default
Outdated
There was a problem hiding this comment.
I don't have strong opinions on what the values here should be, but it should be monitored for potential adjustments
8c32a87 to
a142974
Compare
…ification on duplicate submission
a142974 to
3f62400
Compare
🎫 Ticket
Link to the relevant ticket:
LG-13138
🛠 Summary of changes
Updates the "Yes, continue..." button to use a simple_form component adding built-in protection against double clicking the button.
Set the rate limiter timing to 2 minutes so the page response will have time to finish POSTing regardless of multiple button mashing and slow connection. If the user ended up needing to re-submit a request the limiter should expire by the time they return there.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
The simulated email pop up should only appear once and not every time you clicked.