ikiwiki/debian
Joey Hess 716560b7f1 check for invalid utf-8, and toss it back to avoid crashes
Since ikiwiki uses open :utf8, perl assumes that files contain valid utf-8.
If it turns out to be malformed it may later crash while processing strings
read from them, with 'Malformed UTF-8 character (fatal)'.

As at least a quick fix, use utf8::valid as soon as data is read, and if
it's not valid, call encode_utf8 on the string, thus clearing the utf-8
flag. This may cause follow-on encoding problems, but will avoid this
crash, and the input file was broken anyway, so GIGO is a reasonable
response. (I looked at calling decode_utf8 after, but it seemed to cause
more trouble than it was worth. BTW, use open ':encoding(utf8)' avaoids
this problem, but the corrupted data later causes Storable to crash when
writing the index.)

This is a quick fix, clearly imperfect:
- It might be better to explicitly call decode_utf8 when reading files,
  rather than using the IO layer.
- Data read other than by readfile() can still sneak in bad utf-8. While
  ikiwiki does very little file input not using it, stdin for the CGI
  would be one way.
2008-11-12 17:30:54 -05:00
..
.gitignore Add debian/.gitignore, with ignores for Debian build products 2008-01-26 22:28:44 -08:00
NEWS willu's teximg changes 2008-08-24 15:21:51 -04:00
README.Debian Remove trailing whitespace from README.Debian 2008-02-10 22:55:48 -08:00
changelog check for invalid utf-8, and toss it back to avoid crashes 2008-11-12 17:30:54 -05:00
compat debianise 2006-03-15 04:05:53 +00:00
control fix lintian warning 2008-10-05 19:17:24 -04:00
copyright document google plugin 2008-10-10 17:13:33 -04:00
examples generate an example ikiwiki.setup as part of the build 2008-07-26 23:02:46 -04:00
postinst editpage escaping fixes 2008-07-06 15:52:04 -04:00
preinst make set -e 2008-10-05 19:17:16 -04:00
rules avoid clobbering example diffurl 2008-07-27 00:54:15 -04:00

README.Debian

It's a good idea, and in some cases a requirement, to rebuild your wikis
when upgrading to a new version of ikiwiki. If you have a lot of different
wikis on a system, this can be a pain to do by hand, and it's a good idea
to automate it anyway.

This Debian package of ikiwiki supports rebuilding wikis on upgrade. It
will run ikiwiki-mass-rebuild if necessary when upgraded. The file
/etc/ikiwiki/wikilist lists the setup files of wikis to rebuild, as well
as the user who owns the wiki. Edit this file and add any wikis you
set up.

You can also allow users to maintain their own list of wikis to rebuild,
by listing their usernames in /etc/ikiwiki/wikilist without corresponding
setup files.  ikiwiki will then read their lists of wikis from
.ikiwiki/wikilist in their home directories.


The examples directory contains the source to some example wiki setups.