Commit Graph

18 Commits (43a88daa5fc23fb70c22ab4472dd293e04b7236d)

Author SHA1 Message Date
Simon McVittie 2bde54c9dc t: Consistently remove temp directory before testing, not after
When a test fails, it's useful to be able to inspect the output.

Signed-off-by: Simon McVittie <smcv@debian.org>
2019-02-03 12:34:46 +00:00
Simon McVittie 4729ff0812 Exclude working directory from library path (CVE-2016-1238)
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 ".".
2016-07-28 09:50:21 +01:00
Simon McVittie cdfb4ab1a3 Run autopkgtest tests using autodep8 and the pkg-perl team's infrastructure 2015-11-30 18:26:22 +00:00
Simon McVittie a1fda0b516 Standardize on --long-option instead of -long-option
[[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.
2015-03-01 16:15:01 +00:00
Joey Hess 811b477c35 fix test case ogg mime type
Seems that a better mime type is detected now on Debian stable.
2014-06-13 10:25:27 -04:00
Joey Hess 90ebe2e57d avoid running this test if File:MimeInfo is not installed
it's needed to get mime types in the feed
2014-01-25 17:08:22 -04:00
Amitai Schlair 0c320f45e8 Genericize download link for more use cases. 2013-06-26 20:21:33 -04:00
Amitai Schlair 2df57e9906 Un-copy-paste the fancy-podcast tests. 2013-02-21 23:12:15 -05:00
Amitai Schlair d77ee60b15 Render fancy podcast enclosures.
Simple podcast feeds didn't have content tags and I made sure to
keep it that way. This may be unnecessarily conservative. Changing
the behavior to include empty content tags might be fine, but I
don't want to think about it right now, I just want my tests to
keep passing!

The new fancy-podcast tests are copy-pasted-edited from the
simple-podcast tests. These tests shall be refactored.
2013-02-20 21:16:19 -05:00
Amitai Schlair 3d2be49420 Make enclosures absolute (in feeds they have to be). 2013-02-20 19:14:20 -05:00
Amitai Schlair a7a68417d0 When inlining HTML pages, render enclosures. 2013-02-19 20:22:47 -05:00
Amitai Schlair c3b17740ae Document that last enclosure wins. 2013-02-19 20:22:47 -05:00
Amitai Schlair 0e278c4a84 Make enclosure follow WikiLink LinkingRules. 2013-02-19 20:22:46 -05:00
Amitai Schlair 45d58983d2 Rename some posts and fix wrong assumptions. 2013-02-19 20:22:46 -05:00
Amitai Schlair 546da9bac7 Make [[!meta enclosure=foo.mp3]] "work" for HTML. 2013-02-19 20:22:46 -05:00
Amitai Schlair 86df150fb0 Document that podcasts are text XOR enclosure. 2013-02-19 20:22:46 -05:00
Amitai Schlair 10b6cb6ee5 Wrap a long line. 2013-02-19 20:22:46 -05:00
Amitai Schlair c9c00b7c25 Add tests for existing podcast behavior. 2013-02-19 20:22:45 -05:00