Commit Graph

8 Commits (4d355918f0ee478c63084661e617ba44ddc360bb)

Author SHA1 Message Date
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
Amitai Schlair f501994678 Indent. 2016-02-24 17:46:11 -05:00
Amitai Schlair b435ddb8de Optionally accept and emit comments' url/email/ip. 2014-12-28 10:02:26 -05:00
Amitai Schlair c574e7b422 Take advantage of having changed commentdate(). 2014-12-27 22:45:27 -05:00
Amitai Schlair 38a088a433 ikiwiki-comment: optionally override parameters. 2014-12-27 22:38:18 -05:00
Amitai Schlair 47954c09ee Accept comments on stdin (useful for importing). 2014-12-27 19:27:55 -05:00
Joey Hess eb7baeb196 the user might specify a directory, rather than a file, if so just put the comment in the directory 2014-11-25 15:44:34 -04:00
Joey Hess 82a4fb49ae add ikiwiki-comment program 2014-10-20 12:08:07 -04:00