At Wikimedia, $wgImageMagickConvertCommand points to a shell wrapper
that invokes ImageMagick convert with:
firejail --profile=/etc/firejail/mediawiki-converters.profile
firejail emits to stderr an information message:
Reading profile /etc/firejail/mediawiki-converters.profile
That ends up in HHVM stderr and is populated up to logstash as an error.
MediaWiki does check imagemagick version by running `convert -version`,
switch from wfShellExec() to wfShellExecWithStderr().
Bug: T158649
Change-Id: I78d1ef59533c605f59b42e10556bb595d6c2cc15
Give access to the raw Message instead of only to the HTML or text in
the RequestContext language.
Pass Message objects instead of strings from calling ->text() as the
parameters of Messages so if the outer Message's language is changed
things get parsed sensibly.
Change-Id: Ibd6c1217b6fed839c888b66e02900f8e21ed3e6b
* Use services container in more places.
* Undeprecated getLocalServerInstance() since $fallback is not
handled elsewhere.
Change-Id: Id1fcd1c465d2d92653357523f4225f1c4d1ace2f
Also consistently use self:: instead of BagOStuff:: for constants
referenced within the BagOStuff class.
Change-Id: I20fde9fa5cddcc9e92fa6a02b05dc7effa846742
The check if the image area is smaller than $wgMaxImageArea can be
bypassed for ForeignApiFile, because the transform of the file is done
on another physical server and therefore has it own check for
$wgMaxImageArea.
A possible TransformTooBigImageAreaError from the foreign server will be
shown when needed (Prepended by message 'thumbnail_error_remote').
Bug: T34387
Change-Id: Iccb25c00e132a4fe744840b7b8db7d9af620bce2
&$params was changed to $params, but hooks.txt still documents
this parameter as being passed by reference, and VipsScaler expects this.
Giuseppe and I suspect this may be what's causing the HHVM segfaults
we're seeing in beta labs.
Change-Id: Ib018f23bc44c247aefc277a0c75ff8577f309ab4
Added a TransformTooBigImageAreaError to allow setting an extra message.
Added also size-*pixel messages to show the value of $wgMaxImageArea
with some formatting.
This error is still throwing for all files, to fix bug T34387 this needs
a follow up with a proper check. I am not sure, if a File::isLocal() is
okay, because files from a DBForeignRepo maybe transformed on the same
server, so the check needs to be done also for this. For APIForeignRepo
the check is done on the foreign server.
Change-Id: Ieba12e424c8bddb1961a30d3f9ea5c8ff241abb5
BitmapHandler has a lot of generic-ish functionality that could
be re-usable by extension classes (Such as how it organizes
$scalerParams array, or various image magick escaping methods).
However it's combined with a lot of very format specific things,
such as the shell-out call to image magick.
Try to separate out the more generic stuff into
TransformationalImageHandler. In order to do this, I also made
canRotate, autoRotateEnabled, and getScalerType non-static. No
extensions in our repo appeared to be using these methods, and they
don't really make sense to be static (imo).
In particular, I think code duplication can be reduced in
PagedTiffHandler by extending this new class. See comments
on I1b9a77a4a56eeb65.
Change-Id: Id3a8b25a598942572cb5791a95e86054d7784961