fix(assessment): escape citation URLs in GA appendix wikitext#156
Open
tieguy wants to merge 1 commit into
Open
fix(assessment): escape citation URLs in GA appendix wikitext#156tieguy wants to merge 1 commit into
tieguy wants to merge 1 commit into
Conversation
A citation url=/archive-url= comes straight from article wikitext via
url::Url::parse, and the url crate leaves ] { } unencoded in a query or
fragment. Emitted raw into the appendix's [url …] external-link syntax, a
source URL like https://example.test/x?y=]{{Delete}} closed the link early
and turned the trailing {{Delete}} into a live template transclusion in the
wikitext an editor pastes onto a GA review page — article-sourced wikitext
injection. Every URL emission now routes through escape_wikitext_url, which
percent-encodes the external-link-hostile characters (keeping the link live,
unlike escape_verbatim's <nowiki> wrapper). Other verbatim fields already
went through escape_verbatim; URLs were the lone unescaped one.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tieguy
force-pushed
the
fix-ga-appendix-url-escaping
branch
from
July 16, 2026 19:44
12d388b to
3d34662
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.
url::Url leaves
]}{unencoded in query/fragment, so a citation URL likehttps://x?y=]{{Delete}}breaks out of[url]syntax into a live template in the rendered GA appendix.Adds
escape_wikitext_url()and routes all URL emissions through it.Impact: attacker-controlled citation text in an article can reach a human's clipboard as live wikitext when the GA appendix is pasted back into a page.
🤖 Generated with Claude Code