AO3-7432 Fix 500 error when leaving kudos with JavaScript disabled - #5962
Open
evanwhitt wants to merge 1 commit into
Open
AO3-7432 Fix 500 error when leaving kudos with JavaScript disabled#5962evanwhitt wants to merge 1 commit into
evanwhitt wants to merge 1 commit into
Conversation
evanwhitt
force-pushed
the
AO3-7432-kudos-redirect-anchor
branch
from
August 3, 2026 03:54
381f6b7 to
af1654b
Compare
evanwhitt
force-pushed
the
AO3-7432-kudos-redirect-anchor
branch
from
August 4, 2026 00:21
af1654b to
2505ea6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
AO3-1234 Fix thing)Issue
https://otwarchive.atlassian.net/browse/AO3-7432
Purpose
Leaving kudos with JavaScript disabled can 500 if the page you're on already has an anchor in the URL (e.g. you're at the bookmark form, so the URL ends in
#bookmark-form).The kudos redirect just glued
#kudos_messageonto the referer URL, which gives you something like...#bookmark-form#kudos_message. Ruby's URI parser rejects the#inside the fragment, so Rails' open redirect protection throwsOpenRedirectErrorand you get a 500.Fix: strip any existing anchor from the redirect target before adding
#kudos_message.Testing Instructions
Smoke test as per the Jira issue:
#kudos_messageat the end of the URL, taking you to the success or error message.#bookmark-form) to confirm no 500.Credit
Evan W (he/him) [b1ume]