Skip to content

Use POST forms for tavern bookmarks (#310) - #516

Merged
Almad merged 1 commit into
dracidoupe:masterfrom
jimmeak:fix/issue-310-tavern-bookmark-form
Jul 18, 2026
Merged

Use POST forms for tavern bookmarks (#310)#516
Almad merged 1 commit into
dracidoupe:masterfrom
jimmeak:fix/issue-310-tavern-bookmark-form

Conversation

@jimmeak

@jimmeak jimmeak commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

The bookmark/unbookmark link changes data through GET, which browsers can prefetch. This switches it to a small POST form instead.

I kept the button looking like the old link and added checks for bookmarking, unbookmarking, bad actions, GET requests and CSRF.

Tests and Ruff pass locally, and the GitHub checks are green too.

Fixes #310.

Replace state-changing bookmark links with CSRF-protected forms and validate bookmark actions from POST data. Preserve the existing link appearance and cover mutation, validation, and rendering behavior.\n\nFixes dracidoupe#310.
@jimmeak
jimmeak marked this pull request as ready for review July 14, 2026 09:30
@jimmeak
jimmeak requested a review from Almad July 14, 2026 09:30

@Almad Almad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Almad
Almad merged commit 216b1ca into dracidoupe:master Jul 18, 2026
2 checks passed
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.

Tavern Table (un)book should be a form

2 participants