Commit Graph

9 Commits (26dae8f04955915f4203fab4bd5301c959f7771a)

Author SHA1 Message Date
Joey Hess 8f6e0212fd verify page name is sane
paranoia; I was thinking about XSS attacks specificaly
2009-08-08 12:27:48 -04:00
Joey Hess 22edaf77c2 fix misleading comment 2009-08-08 12:23:50 -04:00
Simon McVittie 70b1c2aabd getsource: remove temporary variable 2009-07-27 11:58:36 +01:00
Simon McVittie 2ef53b128d getsource: remove unnecessary IkiWiki:: prefixes
Many variables and functions are exported.
2009-07-26 17:04:49 +01:00
Simon McVittie ea244ab7b5 getsource: don't allow getting the source of an attachment
Serving up images etc. as text/plain; charset=utf-8 is unlikely to work
very well, and there's no point in having this CGI action for attachments
(since they're copied into the output as-is anyway).
2009-07-26 17:04:34 +01:00
Simon McVittie 0afcec7346 getsource: turn missing pages into a 404
Also restructure so we return early on missing pages.
2009-07-26 17:04:30 +01:00
Simon McVittie 3f520da78a getsource: default to saying page source is in UTF-8, and make the example match the default
IkiWiki mostly assumes that pages are in UTF-8; anyone this doesn't work
for can override it in the setup file.
2009-07-26 16:36:17 +01:00
Simon McVittie eaf59e5ba9 getsource: run as plain CGI, rather than sessioncgi
As I suggested when reviewing Will's code, calling loadindex() should be
sufficient.
2009-07-26 16:33:12 +01:00
Will Uther 01e4cb1464 Add getsource plugin 2009-07-26 16:22:56 +01:00