aboutsummaryrefslogtreecommitdiff
path: root/t/img.t
Commit message (Collapse)AuthorAge
* t: Consistently remove temp directory before testing, not afterSimon McVittie2019-02-03
| | | | | | When a test fails, it's useful to be able to inspect the output. Signed-off-by: Simon McVittie <smcv@debian.org>
* img test: Exercise a format that is uncommon on the web (BMP)Simon McVittie2018-02-28
| | | | Signed-off-by: Simon McVittie <smcv@debian.org>
* img test: Don't rely on using an empty ImageMagick coder nameSimon McVittie2018-02-28
| | | | | | | | | This used to work, but has been interpreted as a literal part of the filename since ImageMagick 6.9.8-3. In newer versions, there does not seem to be any way to indicate that a filename containing ':' is to be taken literally without first knowing the decoder to use. Signed-off-by: Simon McVittie <smcv@debian.org>
* t/img.t: test determinism of PNG resizing.intrigeri2017-09-01
|
* t/img.t: Give better diagnostics if we can't load an imageSimon McVittie2017-06-22
|
* Exclude working directory from library path (CVE-2016-1238)Simon McVittie2016-07-28
| | | | | | | | | | | | | | | | | | | | | Current Perl versions put '.' at the end of the library search path @INC, although this will be fixed in a future Perl release. This means that when software loads an optionally-present module, it will be looked for in the current working directory before giving up. An attacker could use this to execute arbitrary Perl code from ikiwiki's current working directory. Removing '.' from the library search path in Perl is the correct fix for this vulnerability, but is not trivial to do due to backwards-compatibility concerns. Mitigate this (even if ikiwiki is run with a vulnerable Perl version) by explicitly removing '.' from the search path, and instead looking for ikiwiki's own modules relative to the absolute path of the executable when run from the source directory. In tests that specifically want to use the current working directory, use "-I".getcwd instead of "-I." so we use its absolute path, which is immune to the removal of ".".
* img test: exercise upper-case extensions for image filesSimon McVittie2016-05-09
|
* Fix spelling of "ratio" in test.Amitai Schlair2016-05-08
|
* img: make img_allowed_formats case-insensitiveSimon McVittie2016-05-07
|
* update test suite for svg passthrough by img directiveJoey Hess2016-05-06
| | | | | Remove build dependency libmagickcore-6.q16-2-extra which was only there for this test.
* img: check magic number before giving common formats to ImageMagickSimon McVittie2016-05-05
| | | | | This mitigates CVE-2016-3714 and similar vulnerabilities by avoiding passing obviously-wrong input to ImageMagick decoders.
* img: restrict to JPEG, PNG and GIF images by defaultSimon McVittie2016-05-05
| | | | | | This mitigates CVE-2016-3714. Wiki administrators who know that they have prevented arbitrary code execution via other formats can re-enable the other formats if desired.
* img test: use the right filenames when testing that deletion occursSimon McVittie2016-01-19
| | | | | Also use a less misleading name for the sample SVG: it is no longer empty. Since commit 105f285a it has contained a blue square.
* img test: skip testing PDFs if unsupportedSimon McVittie2016-01-19
|
* t/img.t: do not spuriously skipSimon McVittie2015-11-30
|
* Run autopkgtest tests using autodep8 and the pkg-perl team's infrastructureSimon McVittie2015-11-30
|
* Sans ImageMagick, bail gracefully.Amitai Schlair2015-08-22
|
* img test: set old timestamp on source file that will changeSimon McVittie2015-06-14
| | | | This is so that the test will pass even if it takes less than 1 second.
* img: stop ImageMagick trying to be clever if filenames contain a colonSimon McVittie2015-06-13
| | | | | | | | | | $im->Read() takes a filename-like argument with several sets of special syntax. Most of the possible metacharacters are escaped by the default `wiki_file_chars` (and in any case not particularly disruptive), but the colon ":" is not. It seems the way to force ImageMagick to treat colons within the filename as literal is to prepend a colon, so do that.
* Standardize on --long-option instead of -long-optionSimon McVittie2015-03-01
| | | | | | | | | | [[forum/refresh_and_setup]] indicates some confusion between --setup and -setup. Both work, but it's clearer if we stick to one in documentation and code. A 2012 commit to [[plugins/theme]] claims that "-setup" is required and "--setup" won't work, but I cannot find any evidence in ikiwiki's source code that this has ever been the case.
* Work around Debian #771047: use a non-blank SVG for the regression testSimon McVittie2014-11-26
| | | | | | | Inkscape loses the bounding box of a SVG with no content when it converts it to EPS, and ImageMagick does not have a special case for converting SVG to PNG with Inkscape in one step (which Inkscape can do); it prefers to convert SVG to EPS with Inkscape, then EPS to whatever.
* img test: skip SVG tests if unsupported by Image::MagickSimon McVittie2014-09-16
|
* Pass -templatedir to get this test passing again.Amitai Schlair2014-09-15
|
* use readfile() instead of reinventing itSimon McVittie2014-09-01
| | | | | This avoids potential action-at-a-distance from locally redefining $/ but never reaching the end of the redefinition's scope.
* unit test for bugs/image_rescaling_distorts_with_small_pictureschrysn2014-07-15
|
* make img unittest easier to debugchrysn2014-07-15
|
* img plugin: split resizing calculations and actual resizingchrysn2014-07-15
| | | | | | | | | | | | | | | | | | | | | | there is now a size calculating part (which chooses a final size) and a scaling part (which triggers if the sizes calculated by the former indicate a downscaling). this solves the issue of unproportional upscalings (bugs/image_rescaling_distorts_with_small_pictures). also, "small" pdf files (or pdf files without explicit size settings), which would not be converted under the old mechanism, now get rendered to pngs. this commit affects a unit test: while svgs were previously unconditionally rendered to pngs, this now only happens on downscaling. this is intentional -- while a small version of an svg graphic is likely to be more compact when rendered (eg as a preview), a large version would not have that benefit, and why convert something that browsers basically can show and be inconsistend with how other images are handled. the new unit test simply makes the original svg larger to check for the same behaviros as before.
* drop unittest workaround for new perlmagickchrysn2014-07-04
| | | | just install -extra to make it work
* drop unittest workaround for perlmagickchrysn2014-07-04
| | | | this was actually http://bugs.debian.org/753770
* make unittest work with all all three packages that provide perlmagickchrysn2014-07-04
|
* add unittests for imgchrysn2014-07-04
this focuses on the features introduced in http://ikiwiki.info/bugs/svg_and_pdf_conversion_fails/