https://bugzilla.wikimedia.org/show_bug.cgi?id=28810

--- Comment #6 from Neil Kandalgaonkar <[email protected]> 2011-09-08 
01:11:42 UTC ---
(In reply to comment #5)
> To confirm -- is the prototype configuration using on-demand thumbnailing, 

yes

> a separate image scaler subcluster

no

>, and the $wgUploadStashScalerBaseUrl
> configuration option?

Okay, live, we use this in CommonSettings.php:

    $wgUploadStashScalerBaseUrl =
"$urlprotocol//upload.wikimedia.org/$site/$lang/thumb/temp";

We could use this with commons.prototype.wikimedia.org but that would just
point to the same server again.



> Things seem to go through a wildly different code path in this configuration,

Yup.


> where it performs some sort of manually-proxied HTTP request instead of 
> loading
> the file from the filesystem.

Yes, if I understand the code, img_auth.php cannot be used with scaled images.
It chops off any /\d+-px/ prefix. So you get the original no matter what you
ask for, via the StreamFile interface.

The whole point here was to get thumbnails, in a way that nobody but the
uploading user could access (since it wasn't published yet, hasn't been looked
at by anybody). 

So, we assume that the scaler has NTP access to the temporary file in the temp
zone. Then we request a scaled version via HTTP, and then pass the data to the
client.

(Note that the client theoretically could have done this request directly from
their browser, but they don't know the tmpnam the server gave their file.
That's what makes it reasonably secure.)

What could be simpler? :(


> IIRC img_auth.php is handled by having the proxy configuration send those
> requests to the image scalers directly, so in the MW code nothing very clever
> has to happen.

I don't understand what you mean here.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to