Page MenuHomePhabricator

Thumbnails for local uploads broken on Wikivoyage
Closed, ResolvedPublic

Description

Thumbnails aren't being generated on Wikivoyage. Example:
http://en.wikivoyage.org/wiki/File:Map_of_Agra_Fort.jpg

Thumbnail request fails as error 401:
http://upload.wikimedia.org/wikivoyage/en/thumb/4/47/Map_of_Agra_Fort.jpg/763px-Map_of_Agra_Fort.jpg

Only tested (with test upload as well) on en.wv, but may exist in other languages as well.

en.wikivoyage allows local fair use uploads under an EDP.


Version: unspecified
Severity: major

Details

Reference
bz42133

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:07 AM
bzimport set Reference to bz42133.
bzimport added a subscriber: Unknown Object (MLST).

Interesting corner case. So what happens is:

The request comes from the caching layer to Swift; from there, our rewrite handler in the pipeline tries to fetch it from Swift itself, and if that 404s, then it forwards it to imagescalers/MediaWiki.

However, since in this case the container doesn't exist, Swift defaults to 401, presumably for security reasons: attackers should not get 404 for missing containers, as this would allow them to brute force container names until they get a 401 (information disclosure).

So the request never gets passed on to imagescalers, and imagescalers never create the containers, so we're essentially deadlocked.

I'm reluctant to also forward 401s to imagescalers. The only solution I can see -other than creating them by hand in the rare cases we add wikis- would be for MediaWiki to be even more smart and create thumb containers when originals are made. I know very little of MediaWiki's Swift architecture though, so I can't speak for the feasibility of this.

I created the en.wv container by hand and it seems to work now; I didn't do the same for the other languages though, in case Aaron or someone else wants to test things.

Confirmed working on en.wv, thanks. As standard operating procedure we should implement whatever the final fix is on all wikis, even ones with local uploads disabled, as they may always change their mind about wanting to enable them.

This seems to be fixed on all wikis now so closing as fixed.

How was this fixed? Aaron, did you create the containers or did you fix MediaWiki to somehow create them? We should note this for next time :)

Gilles raised the priority of this task from High to Unbreak Now!.Dec 4 2014, 10:21 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to High.Dec 4 2014, 11:21 AM