Page MenuHomePhabricator

Identify source of gadget/extension pointing to thumb.php on imagescalers
Closed, DeclinedPublic

Description

Looking at the traffic left on image scalers now that thumbor is handling all of upload.wikimedia.org, I see hits on thumb.php. They all seem to be for icons and the referer is always a Polish project:

http://commons.wikimedia.org/w/thumb.php?f=Gnome-mime-application-msword.svg&w=18	-	image/png	https://pl.wikisource.org/
http://commons.wikimedia.org/w/thumb.php?f=Broom%20icon.svg&w=22	https://pl.wikipedia.org/
http://commons.wikimedia.org/w/thumb.php?f=Edit%20remove.svg&w=15	image/png	https://pl.wikipedia.org/
http://commons.wikimedia.org/w/thumb.php?f=Noia_64_apps_kmix_mod.png&w=22&	-	image/png	https://pl.wiktionary.org/

This feels like an extension or gadget that would be on popular in the Polish community. It should be fixed to point to upload.wikimedia.org, which would give it varnish caching.

AFAIK it required special effort to point to that URL, as the wiki itself never does when it's configured to use upload.wikimedia.org. I don't think we should go out of our way to support that use case.

Event Timeline

gilles@terbium:~$ mwgrep "thumb.php"
## Public wiki results
bhwiki              MediaWiki:Gadget-searchbox.js
commonswiki         MediaWiki:Gadget-CatTreeGallery.js
commonswiki         MediaWiki:Gadget-CategoryGallery.js
commonswiki         MediaWiki:Gadget-fastcci.js
commonswiki         MediaWiki:QIvoter.js
commonswiki         MediaWiki:UploadHelper-fa.js
fawiki              MediaWiki:TofawikiUpload.js
frwiki              MediaWiki:Gadget-searchbox.js
frwikibooks         MediaWiki:Gadget-searchbox.js
frwikinews          MediaWiki:Gadget-searchbox.js
frwikiversity       MediaWiki:Gadget-searchbox.js
frwiktionary        MediaWiki:Gadget-searchbox.js
hiwiki              MediaWiki:Gadget-searchbox.js
hywikisource        MediaWiki:Gadget-Tools.js
itwikisource        MediaWiki:Gadget-Tools.js
kshwiki             MediaWiki:Gadget-gotmessages.js
lvwiki              MediaWiki:Gadget-sk.js
maiwiki             MediaWiki:Gadget-searchbox.js
newiki              MediaWiki:Gadget-searchbox.js
ocwikibooks         MediaWiki:Common.js
plwiki              MediaWiki:Gadget-nuxedtoolkit.js
plwiki              MediaWiki:Gadget-searchbox.js
plwiki              MediaWiki:Gadget-sk.js
plwikibooks         MediaWiki:Gadget-sk.js
plwikinews          MediaWiki:Gadget-sk.js
plwikiquote         MediaWiki:Gadget-insert-category.js
plwikiquote         MediaWiki:Gadget-insert-category.js
plwikiquote         MediaWiki:Gadget-insert-image.js
plwikiquote         MediaWiki:Gadget-save-preview-buttons.js
plwikiquote         MediaWiki:Gadget-save-preview-buttons.js
plwikiquote         MediaWiki:Gadget-sk.js
plwikiquote         MediaWiki:Gadget-sk.js
plwikisource        MediaWiki:Gadget-edittools.js
plwikisource        MediaWiki:Gadget-insert-section.js
plwikisource        MediaWiki:Gadget-sk.js
plwiktionary        MediaWiki:Gadget-extended-toolbar.js
plwiktionary        MediaWiki:Gadget-insert-image.js
plwiktionary        MediaWiki:Gadget-sk.js
plwiktionary        MediaWiki:Gadget-snippets.js
testwiki            MediaWiki:Gadget-gotmessages.js
trwiki              MediaWiki:Gadget-Slideshow.js
trwiki              MediaWiki:Gadget-ThumbnailPurger.js
zhwiki              MediaWiki:Gadget-ScriptImages.js

(total: 43, shown: 43)

Looking at a few, they all seem easy to fix. @Krinkle what's the normal process for getting gadget code fixed?

Useful trick:

  • http://commons.wikimedia.org/w/thumb.php?f=Gnome-mime-application-msword.svg&w=18
  • Manually change to: https://commons.wikimedia.org/wiki/Special:FilePath?file=Gnome-mime-application-msword.svg&width=18 (note: file, width)
  • .. which redirects to: https://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/Gnome-mime-application-msword.svg/18px-Gnome-mime-application-msword.svg.png

@Gilles As for process, there isn't an official one, but you could ask in Babel on Meta-Wiki and be sure to ping various interface editors in the thread.

Alternatively, you could approach it from the local perspective and leave messages on the talk pages of these scripts. However, in my experience this doesn't work as well as they are not (or no longer) on any active user's watchlist.

In either event, it would be good to add an explanatory message to the task description here (e.g. what should be changed, and why, + an example), and then refer to the task in the on-wiki messages.

@Gilles as @Krinkle said leaving messages is often not very effective with regards to this kind of issues, at least on small wikis. On those small/medium sized wikis I'd say that an interface editor could just go ahead and fix the code. For large wikis I'd leave a message at the talk page of the Gadget and on their adminboard.

Note to self:

https://commons.wikimedia.org/w/thumb.php?f=Gnome-mime-application-msword.svg&w=18
rewritten as
https://commons.wikimedia.org/w/index.php?title=Special:FilePath&file=Gnome-mime-application-msword.svg&width=18
redirects to canonical form:
https://upload.wikimedia.org/wikipedia/commons/thumb/b/b9/Gnome-mime-application-msword.svg/18px-Gnome-mime-application-msword.svg.png
Don't try to construct the url manually (eg. based on hashing the filename etc.) because sometimes the redirect may go from local wiki to commons, or to a different size or file format (e.g. if thumb same or larger than original, we sometimes serve the original). So it's best to always let MW resolve it.

Gilles changed the task status from Open to Stalled.Sep 27 2017, 8:01 AM

This cleanup is no longer necessary, as thumb.php requests are now proxied to Thumbor on public wikis.