summaryrefslogtreecommitdiff
path: root/IkiWiki.pm
AgeCommit message (Collapse)Author
2008-11-12check for invalid utf-8, and toss it back to avoid crashesJoey Hess
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-11make unlockwiki drop the cgilockJoey Hess
This is necessary so that things that fork to the background, like pinger, and inline ping, don't block other cgis from running. Note that websetup also calls unlockwiki, before refreshing / rebuilding the wiki. It makes perfect sense for that not to block other cgis.
2008-11-11lockwiki changesJoey Hess
* Stop busy-waiting in lockwiki, as this could delay ikiwiki from waking up for up to one second. The bailout code is no longer needed. * Remove support for unused optional wait parameter from lockwiki.
2008-11-09Fix the link() pagespec to match links that are internally recorded as absolute.Joey Hess
This fixes a problem exposed by the recent change to tags (a2839de9362187b67b0e3a564461e272e64fd9b4). That recorded tag links as absolute by including a leading slash in the link. The same could also be done with an absolute wikilink. In either case, link() would not match such links, unless the leading slash was included in the link to match. But that's not right, because pagespecs match absolute by default. So strip the leading slash. Note that to keep any existing `link(/foo)` pagespecs working after this change, the leading slash is removed from there, too.
2008-11-07document wikistatedir, though it's still internalJoey Hess
2008-11-06meta: Plugin is now enabled by default since the basewiki uses it.Joey Hess
2008-10-29allow_symlinks_before_srcdir is a booleanJoey Hess
2008-10-23untrusted committers code seems to be fully workingJoey Hess
Still need to investigate possible races, and test some more.
2008-10-23more work on untrusted committersJoey Hess
Wired up check_canedit and check_canremove, still need to deal with check_canattach, and test.
2008-10-22initial support for git repos with untrusted committersJoey Hess
Still need to wire up the calls to check_* , but it's cold out here and my hands are going numb, so enough for now.
2008-10-21function injection overhaulJoey Hess
Add an inject function, that can be used by plugins that want to replace one of ikiwiki's functions with their own version. (This is a scary thing that grubs through the symbol table, and replaces all exported occurances of a function with the injected version.) external: RPC functions can be injected to replace exported functions. Removed the stupid displaytime hook, and use injection instead.
2008-10-19add displaytime hookJoey Hess
Need to use a hook because an exported function cannot be reliably overridden. The replacement verstion was actually only affecting plugins loaded after it. formattime doesn't need a hook, since there's no reason to export it.
2008-10-19fix relativedate timezone inclusionJoey Hess
The machine parseable date needs to include a timezone. Also, simplified the interface for date display.
2008-10-17add_underlay: avoid adding the same underlay twiceJoey Hess
2008-10-08lockedit: Support specifying which users (and IP addresses) a page is locked ↵Joey Hess
for. This supports most of the ACL type things users have been wanting to be done. Closes: #443346 (It does not control who can read a page, but that's out of scope for ikiwiki.)
2008-10-01typoJoey Hess
2008-09-29add newpagefile functionJoey Hess
2008-09-29Add indexpages optionJoey Hess
This is the easy part of supporting foo/index.mdwn sources for page foo. Note that if foo.mdwn exists too, there will be a warning about multiple sources for the same page, and which is used is indeterminate. indexpages should also cause web based editing to create index source pages by default; this and other fallout of the option not yet implemented.
2008-09-27editpage: Be more aggressive (and less buggy) about cleaning up temporary ↵Joey Hess
files rendered during page preview.
2008-09-27Add %wikistate, which is like %pagestate except not specific to a given ↵Joey Hess
page, and is preserved across rebuilds.
2008-09-27Reorganize index file, add a format version field.Joey Hess
Upgrades to the new index format should be transparent. The version field is 3, because 1 was the old textual index, 2 was the pre-versioned format. This also includes some efficiency improvements to index loading, by not copying a hash and using a reference.
2008-09-27Export pagetitle, titlepage, linkpage.Joey Hess
2008-09-23Add keepextension parameter to htmlize hook. (Willu)Joey Hess
2008-09-11Improve error message if external plugin fails to load. Closes: #498458Joey Hess
2008-09-09Add allow_symlinks_before_srcdir to config so websetup doesn't eat it.Joey Hess
2008-09-05editpage: New core plugin factoring out page editing to allow disabling it ↵Joey Hess
if desired.
2008-09-04For fine control over what characters are allowed, unescaped in source ↵Joey Hess
filenames, the wiki_file_chars setting is added. For example, set to "-[:alnum:]+/._" to disable colons from being used in source files (which can cause trouble om Windows).
2008-08-29Work around perl $_ scoping nonsense that caused breakage when loading ↵Joey Hess
external plugins.
2008-08-06Options set in the setup file are now immediatly loaded by ikiwiki -setup. ↵Joey Hess
This allows later switches to override them. Previously, setup file options overrode most command line options.
2008-08-05typoJoey Hess
2008-08-05Revert "typo"Joey Hess
This reverts commit c8d3626c51bdc53781d9431b1da88ae1e92dc2d5.
2008-08-05typoJoey Hess
2008-08-05don't set values for verbose and syslog by defaultJoey Hess
Setting the values in the setup file by default makes it annoyingly hard to override them at the command line (since setup files override the command line). Both default to off if no value is set.
2008-08-04improve fix to DTRT for a param of "0"Joey Hess
2008-08-04Suppress warning about uninitialized value if directives look like [[!foo]]Simon McVittie
(cherry picked from commit cf58eefaa56eb17c227d97d129bf95e3dab54fd3)
2008-08-03reorg settingsJoey Hess
2008-08-03add advanced and basic modesJoey Hess
2008-08-03rewordJoey Hess
2008-08-02show unsafe options (RO) by defaultJoey Hess
Small data leak, but only to admins, and I think it's worth it to see the stuff that cannot be configured.
2008-08-02websetup form display doneJoey Hess
2008-08-01banned_users move to setup file, stage 1Joey Hess
2008-08-01rcs plugin loading reorgJoey Hess
Move rcs plugin load to loadplugins; move duplicate rcs detection logic out of individual plugins and into loadplugins. Avoids checkconfig failing when run twice.
2008-07-30updateJoey Hess
2008-07-27libdir can be emptyJoey Hess
2008-07-26finish with rcs plugin conversionJoey Hess
2008-07-26Merge branch 'master' into autoconfigJoey Hess
2008-07-26wrapper setup reorgJoey Hess
Flattened the wrapper setup, as this lets it be handled better by the setup generation code.
2008-07-26add example wrapper and fix formattingJoey Hess
2008-07-26add missing setup options, tweak others' displayJoey Hess
2008-07-26load all plugins when generating setupJoey Hess