Commit Graph

10 Commits (ea93a94370aa283695bf6674da3c11c0ab07a359)

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 1dbb2632ef another class of conflicts: subdir/file conflicts 2010-07-18 17:16:39 -04:00
Joey Hess d6cb4436bd 2 more cases 2010-07-18 16:45:44 -04:00
Joey Hess 773db5a35e avoid error if two source files render the same destination file
There are two sub-caces. If both source files still exist, the winner that
renders the destination file is undefined. If one source file is deleted
and the other added, in a refresh, the new file will take over the
destination file.
2010-07-18 16:28:39 -04:00
Joey Hess a291f24be6 some other (similar) failure cases 2010-07-18 13:50:06 -04:00
Joey Hess bfa4660df7 update 2010-07-17 13:30:08 -04:00
Joey Hess 4142308429 turning into complete source file conflict test suite 2010-07-17 13:24:40 -04:00