Skip to content

disallow accidental updates to existing links #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025
Merged

Conversation

willnorris
Copy link
Member

Prior to #177, our XSRF tokens were bound to link IDs, with a special .new value used for newly created links. So if a user tried to create a link that already existed, the XSRF check would fail. After #177, this now silently allows the user to overwrite the existing link without any indication that this happened.

This change adds a hidden update param to the details edit form that must be present when updating an existing link.

Updates #177

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d

Prior to #177, our XSRF tokens were bound to link IDs, with a special
`.new` value used for newly created links. So if a user tried to create
a link that already existed, the XSRF check would fail. After #177, this
now silently allows the user to overwrite the existing link without any
indication that this happened.

This change adds a hidden `update` param to the details edit form that
must be present when updating an existing link.

Updates #177

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris <[email protected]>
@willnorris willnorris requested a review from mikeodr April 25, 2025 17:02
@willnorris willnorris merged commit c89d350 into main Apr 25, 2025
4 checks passed
@willnorris willnorris deleted the will/update branch April 25, 2025 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants