Page MenuHomePhabricator

Toolforge 404 handler displays wrong tool name from ?url= query parameter
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
LucasWerkmeister
Mar 27 2026, 7:45 PM
Referenced Files
F73861890: image.png
Mar 27 2026, 7:45 PM
F73861869: image.png
Mar 27 2026, 7:45 PM
F73861864: image.png
Mar 27 2026, 7:45 PM
F73861850: image.png
Mar 27 2026, 7:45 PM

Description

The Integraality tool is currently having issues (the details aren’t relevant here, I think – see T421552 if interested). The result at https://integraality.toolforge.org/update?url=https://www.wikidata.org/wiki/Wikidata:WikiProject_Govdirectory/Spain/Coverage_of_third_level_agencies looks pretty confusing (screenshot via @Olea):

The URL you have requested, www.wikidata.org… doesn’t seem to actually exist … This URL is managed by the www tool, maintained by BryanDavis.

The 404 handler appears to be pulling any subdomain from the ?url query parameter and displaying it instead of the real tool name:
https://integraality.toolforge.org/update?url=https://lexeme-forms.wikidata.org/wiki/Wikidata:WikiProject_Govdirectory/Spain/Coverage_of_third_level_agencies
The URL you have requested, lexeme-forms.wikidata.org… managed by the lexeme-forms tool, maintained by Lucas Werkmeister

This doesn’t happen if the query parameter is called something else:
https://integraality.toolforge.org/update?urll=https://lexeme-forms.wikidata.org/wiki/Wikidata:WikiProject_Govdirectory/Spain/Coverage_of_third_level_agencies
managed by the integraality tool, maintained by Jean-

This can also be reproduced using a tool that doesn’t exist:
https://nosuchtool.toolforge.org/?url=https://quips.example.org

managed by the quips tool, maintained by Yuvipanda

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
The current latest version of fourohfour is e32efb9b40, though I don’t know if that’s also what’s currently deployed.

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
Rename test URL query parameter to avoid conflictsRename testing URL query parametertoolforge-repos/fourohfour!18shadabgdgT421542-rename-url-parammain
Customize query in GitLab

Event Timeline

Restricted Application added a subscriber: • Aklapper. · View Herald Transcript

Hm, apparently this is… intentional? Add handler for /?url=... testing, from 2019, does what it says on the tin.

Perhaps the /?url handler should be hidden behind a config flag, and only the X-Original-URI part should be live in production? (Or the URL parameter could be named something less likely to conflict, e.g. ?tool-fourohfour-url?)

taavi triaged this task as Low priority.Apr 1 2026, 1:54 PM
taavi added a project: patch-welcome.
taavi subscribed.

Renaming the param seems fine.

shadabgdg opened https://gitlab.wikimedia.org/toolforge-repos/fourohfour/-/merge_requests/18

Rename test URL query parameter to avoid conflictsRename testing URL query parameter

Submitted a merge request implementing the proposed renaming of the testing query parameter from url to tool-fourohfour-url to avoid conflicts with applications using a url query parameter.

Merge request: https://gitlab.wikimedia.org/toolforge-repos/fourohfour/-/merge_requests/18

taavi merged https://gitlab.wikimedia.org/toolforge-repos/fourohfour/-/merge_requests/18

Rename test URL query parameter to avoid conflictsRename testing URL query parameter