Commit Graph

191 Commits (cd305909d37546d1f75365f9e92995429927e91a)

Author SHA1 Message Date
joey 3e593eb9c0 * Add "last" parameter to hook function. Very basic ordering, and hopefully
nothing more spohisticated will be needed.
* Add formbuilder_setup and formbuilder hooks.
* Split out a passwordauth module, that holds all the traditional password
  based authentication etc code. It's enabled by default, but can be disabled
  if you want only openid or some other auth method.
2006-11-20 20:37:27 +00:00
joey d389b0e4a4 * Avoid locking the wiki at all when handling some basic cgi stuff
(searches, recentchanges).
2006-11-20 12:03:35 +00:00
joey 7cfdb888e5 increase field widths 2006-11-20 09:59:27 +00:00
joey e43cd269d2 * Add openidsignup config option.
* Make the openid plugin support the callbacks from myopenid.com via its 
  affiliate program.
* Change how post signin actions are propigated through the signin process;
  they're now stored in the session.
2006-11-20 09:40:09 +00:00
joey e7ee388ea1 minor improvements 2006-11-20 06:22:19 +00:00
joey 9f60b7f6cd explanation 2006-11-20 03:22:23 +00:00
joey 702b8721d3 * Add an openid plugin to support logging in using OpenID.
* Web commits by OpenID users will record the full OpenID url for the user,
  but in recentchanges, these urls will be converted to a simplified display
  form+link.
* Modified svn, git, tla backends to recognise such web commits.
2006-11-20 02:46:58 +00:00
joey 54cf5a62ca * Make auth methods pluggable.
* Move httpauth support to a plugin.
* Add an openid plugin to support logging in using OpenID.
2006-11-20 01:52:18 +00:00
joey 60aca5e0fe fixes 2006-11-10 07:51:14 +00:00
joey 96eb9bb3fa * Work around a strange bug in CGI::FormBuilder 3.0401 that makes
FORM-SUBMIT unusable on customised formbuilder templates. For now,
  hardcode the submit buttons in editpage.tmpl instead of using the
  template variable, which is ok, since the buttons are static.
2006-11-10 07:46:41 +00:00
joey 35ee7e44a6 * Make sure to check for errors from every eval. 2006-11-08 21:03:33 +00:00
joey cb3f89f429 * Enable utf8 file IO in aggregate plugin.
* Fix some issues with the new registration form.
2006-11-08 20:13:59 +00:00
joey c3a530ab93 * Improve login/register process, the login dialog has only name and
password fields, which allows more web browsers to regognise it as a login
  field, and is less confusing.
2006-10-30 23:28:01 +00:00
joey a1eaeffe5e delete session 2006-10-28 00:36:34 +00:00
joey b6509c74a9 * Add basic spam fighting tool for admins: An admin's prefs page now allows
editing a list of banned users who are not allowed to log in.
2006-10-28 00:35:33 +00:00
joey 3ef0a67811 * Patch from Recai to limit recentchanges to displaying max 10 files for a
given changeset (to avoid large number of file changes excessively
  bloating the page).
2006-10-14 03:12:30 +00:00
joey be55f6fd7c * Atom feed support based on a patch by Clint Adams.
* Add feeds=no option to inline preprocessor directive to turn off all types
  of feeds. feeds=rss will still work, and feeds=atom was also added, for
  fine control.
* $IkiWiki::version now holds the program version, and is accessible to
  plugins.
2006-10-08 23:57:37 +00:00
joey 67b513e8c4 * Patch from Alec Berryman adding a http_auth config item that allows
using HTTP Authentication instead of ikiwiki's built in authentication.
  Useful for eg, large sites with their own previously existing user auth
  setup. Closes: #384534
2006-10-02 22:56:09 +00:00
joey 26774c931c * Patch from James Westby to deal with the case where you're editing a
new page, hit cancel, and need to be redirected to somewhere sane.
2006-09-16 01:23:14 +00:00
joey 0f25ec8eb6 * pagetemplate hooks are now also called when generating cgi pages.
* Add a favicon plugin, which simply adds a link tag for an icon to each
  page (and cgis).
2006-09-16 00:52:26 +00:00
joey 1e7be2d3dd * Patch from Recai to kill utf-8 on the wiki name when generating the
session cookie.
2006-09-11 16:24:05 +00:00
joey dae0f48e91 * Work on firming up the plugin interface:
- Plugins should not need to load IkiWiki::Render to get commonly
    used functions, so moved some functions from there to IkiWiki.
  - Picked out the set of functions and variables that most plugins
    use, documented them, and made IkiWiki export them by default,
    like a proper perl module should.
  - Use the other functions at your own risk.
  - This is not quite complete, I still have to decide whether to
    export some other things.
* Changed all plugins included in ikiwiki to not use "IkiWiki::" when
  referring to stuff now exported by the IkiWiki module.
* Anyone with a third-party ikiwiki plugin is strongly enrouraged
  to make like changes to it and avoid use of non-exported symboles from
  "IkiWiki::".
* Link debian/changelog and debian/news to NEWS and CHANGELOG.
* Support hyperestradier version 1.4.2, which adds a new required phraseform
  setting.
2006-09-09 22:50:27 +00:00
joey f7d95297bb need to import escapeHTML 2006-09-06 20:03:59 +00:00
joey 1f26347379 escaping fix from Emanuele Aina 2006-09-06 20:02:12 +00:00
joey 92065444d9 * Simplify the data structure returned by rcs_recentchanges to avoid
each rcs plugin needing to form complex strings on its own.
2006-09-03 19:53:23 +00:00
joey 4895955cea * Change htmlize, format, and sanitize hooks to use named parameters. 2006-08-28 18:17:59 +00:00
joey 4ad7c9d625 * Patch from James Westby to add a --sslcookie switch, which forces
cookies to only be sent over ssl connections to avoid interception.
* Factor out the cgi header printing code into a new function.
* Fix preferences page on anonok wikis; still need to sign in to get
  to the preferences page.
2006-08-27 20:25:05 +00:00
joey d4ca3b3f50 * Change order of linkify and preprocess; first preprocess and then linkify.
This allows passing a wikilink inside a parameter to a preprocessor
  directive without it being expanded to html, and leaking out of the
  parameter, which had required some non-obvious use of triple-quoting
  to avoid. Note that any preprocessor plugins that output something
  that looks like a wikilink will now have it treated as such; AFAIK
  this doesn't change any behavior though except for the template plugin.
* Enable preprocessor directives when previewing an edit.
2006-08-23 20:23:57 +00:00
joey cf3021ef3f * Fixed a bug with previews of subpages having broken links to top-level
pages.
* Change how the stylesheet url is determined in the templates: Remove
  STYLEURL and add BASEURL to all templates (some already had it). This
  new more general variable can be used to link to other things (eg, images)
  from the template, as well as stylesheets.
2006-08-21 22:27:02 +00:00
joey 132e41500f * Fix utf-8 in blog post form. 2006-08-20 20:45:55 +00:00
joey be092a67c2 * Fix a bug in page type determination during online editing. 2006-08-13 05:56:01 +00:00
joey 4b36dee35a * The last release accidentially installed ikiwiki as ikiwiki.pl, now fixed.
* Add --version.
* Man page format fixups.
* Add a %pagecase which maps lower-case page names to the actual case
  used in the filename. Use this in bestlinks calculation instead of
  forcing the link to lowercase.
* Also use %pagecase in various other places that want to check if a page
  with a given name exists.
* This means that links to pages with mixed case names will now work,
  even if the link is in some other case mixture, and mixed case pages
  should be fully supported throughout ikiwiki.
* Recommend rebuilding wikis on upgrade to this version.
2006-08-13 02:03:43 +00:00
joey 2794d7ef5a * Renamed GlobLists to PageSpecs.
* PageSpecs can now include nested parens, "and", and "or". This remains
  backwards compatible to the old GlobList format. It's implemented by
  treating the GlobList as a very limited microlanguage that is transformed
  to perl code that does the matching.
* The old GlobList format is deprecated, and I encourage users to switch to
  using the new PageSpec format. Compatability with the old format will be
  removed at some point, possibly by 2.0.
* Wiki rebuild needed on upgrade to this version due to PageSpec change.
* Add support for creation_month and creation_year to PageSpec.
  Closes: #380680
* Changes to index file encoding.
2006-08-02 00:14:31 +00:00
joey ecd74fbe5d avoid message if mailing password or registering 2006-07-30 23:08:10 +00:00
joey ab75c0323b * Add a run_hooks function for the common task of running all hooks of a
given type.
* Add a savestate hook.
* Don't put blog post forms on pages if there's no cgiurl set.
* Reformat front page.
2006-07-30 00:20:11 +00:00
joey d9c118dbf1 * Run page through any relevant filters when generating a page preview.
* Noticed a bug in the wikitext markup plugin -- it made CamelCase links the
  default throughout the wiki, not only on wikitext pages. Decided to call
  this a feature, and split the camelcase support out into a separate plugin
  that is independant of wikitext.
2006-07-26 21:54:44 +00:00
joey b187641376 * Patch from Recai to allow selection of page type when creating a new page.
Default page type is inherited from the link clicked on to create the new
  page.
2006-07-26 21:23:06 +00:00
joey 06ffcb399d <paravoid> you're right
<paravoid> I can't explain it
<paravoid> but it's definitely fixing it
<paravoid> I triple-checked...
2006-07-11 22:06:57 +00:00
joey a9508d6ba8 remove redundant call 2006-07-11 21:32:16 +00:00
joey ed8d6bcf23 * Consolidated all decode_utf8 in FormBuilder's fields to make the code more
readable and avoid future mistakes. The patch seems to work and for the
  first time I have a UTF-8 username ;-) (Faidon)
* Use form->field consistently, not form->param.
2006-07-11 21:20:14 +00:00
joey 50c21744ca * Display CGI processing errors if present. 2006-07-10 21:13:41 +00:00
joey 1bdfa4d8b5 * Support a w3mmode, which lets w3m run ikiwiki using its local CGI
support, to edit pages etc without a web server.
2006-07-07 21:00:48 +00:00
joey 56378a14e2 Encode:: cleanup from Recai 2006-07-05 18:20:25 +00:00
joey 87a1d3ff8f * Encode & in diffurl in examples, to conform to pedantic rules.
* Speed up RecentChanges by another 40% or so with some memoization.
2006-07-04 16:18:18 +00:00
joey f877845353 remove leading dot from default_pageext
fix preview to not assume it's the default page type, and instead get the
type from the page
2006-07-04 01:29:45 +00:00
joey af029154d6 use "use open" pragma to avoid manually needing to specify utf8 everywhere
and also to set default stdio mode

change filetype to return undef, not "unknown"
2006-07-03 22:14:52 +00:00
joey 929b9de9c2 Encode is used in nearly all code paths so stop loading it on demand 2006-07-03 20:18:16 +00:00
joey fa9517e5bb * Support pages with utf8 filenames. Patch by Faidon Liambotis. 2006-07-03 20:12:27 +00:00
joey d1d212203c * Centralised all calls to HTML::Template and force all the templates
to be read as utf8.
2006-07-02 19:06:08 +00:00
joey 0e1bfa69a0 new approach for forcing utf8 -- use a HTML::Template filter 2006-07-02 18:16:44 +00:00
joey ac7b1c32b1 * POSIX::strftime doesn't know about encodings and doesn't return a utf8
flagged string even if the locale causes it to generate utf8 output,
  so make sure to let perl know it should be handled as utf8. Also, 
  the optimised version used for standard time formats won't work if the
  user has changed locale, so drop it. Thanks, Faidon Liambotis.
* Fix re-encoding of the comments field to utf8 if a commit fails
  due to a conflict. Thanks, Faidon Liambotis.
* Let svn know that commits have utf8 commit messages. Thanks, Faidon
  Liambotis.
* Add insane double encode/decode to utf8 around call to markdown.
  This works around a truely strange bug, which is apparently a bug in
  perl, which I lack space to describe here (see t/crazy-badass-perl-bug.t)
2006-07-02 04:02:08 +00:00
joey 0bb605baf8 * Parse svn log as xml for improved utf8 and security. Note that this makes
ikiwiki depend on XML::Simple. Patch by Faidon Liambotis.
2006-07-02 02:18:31 +00:00
joey 4d460d1f82 - Add 'use encoding "utf8"' to CGI.pm to avoid warnings about wide
character in print.
2006-06-17 02:15:00 +00:00
joey f5eb3df1fa * More utf-8 fixes from Recai, partly to things I broke above:
- The serious problem is that writefile() saves the content in undecoded
    format in CGI, hence all (non-ascii) chars are corrupted permanently.
  - Comment field in edit page is not decoded and all the non-ascii chars in
    this field are corrupted as the result.  We should decode it as we do it
    for the content.
2006-06-17 01:44:19 +00:00
joey 202c4d522f * -CSD does not affect modules, so readfile() was not using the utf-8 input
layer, which led to lots of problems; make it force read files as utf-8.
  Closes: #373203
* writefile() likewise needs to use the utf8 output layer.
* Remove the -CSD from ikiwiki's hashbang since it's useless to have it
  there.
* Revert some of the decode_utf8 changes in CGI.pm that seem unnecessary
  given the readfile fix.
* Add utf-8 testcases for readfile and htmlize.
2006-06-15 06:37:33 +00:00
joey 070f255d6c * YA utf-8 patch from Recai, this time to fix previewing a page so that
the text in the input box is re-encoded back to utf-8.
2006-06-15 03:44:27 +00:00
joey 2ce6d15b8b * Patch from Recai Oktaş to improve utf-8 support, it should now use proper
utf-8 for edit and other fields, and for recentchanges. There may still
  be utf-8 issues with the preferences page though.
2006-06-11 18:51:49 +00:00
joey c20c406631 * Add -refresh option to ikiwiki-mass-rebuild and use that on upgrades that
do not need a full rebuild, in order to update any basewiki pages.
2006-05-27 19:04:46 +00:00
joey 65d0aee407 * --getctime had bitrotted (well I only ever used it the once so far..),
* When inlining a page in another one, links from the inlined page are now
  expanded the same as they are when rendering the inlined page as a
  standalone page. So rather than being expanded from the POV of the
  inlining page, they are expanded from the POV of the inlined page.
  For example, a link from blog/foo to "bar" will now link to blog/bar
  if it exists. Previously this needed to be a link explicitly to 
  "blog/bar"; such links will also continue to work.
  (This was slightly complex to do as the link still has to be constructed
  relative to the inlining page.)
2006-05-26 16:11:53 +00:00
joey 282893be81 * Rebuilding on upgrade to this version is recommended.
* Add a html validity check to the test suite, using the wdg-html-validator,
  if available.
* Make the html valid when there is nothing in the actions list by adding an
  empty <li> to the end of it.
* Reordered some function call parameters for consistency.
2006-05-26 08:24:36 +00:00
joey af9566ff1a rather a lot of changes to make hyperestraier search be a plugin, allowing
for other types of search engine plugins if wanted, and also opening up a
lot of new possibilities for other kinds of plugins later

some notable changes along the way:

- lots of new hook types: cgi, render, delete
- wrapper files fixed to support config strings with newlines in them
- HEADERCONTENT in page template useful for plugins. Probably needs to be
  expanded to more such for other places plugins might want to add content.
- remove unnecessary wrappers field from config info stored in wrappers
2006-05-03 21:50:39 +00:00
joey 3b0fce93e4 * Split off an IkiWiki.pm out of ikiwiki and have all the other modules use
it, this will allow for adding a unit test suite.
2006-05-02 06:53:33 +00:00
joey f84b47d080 fix undef warning 2006-05-02 04:37:31 +00:00
joey e7f97eae60 * Smarter behavior when creating a page and a page of the same name (but
different location) already exists.
2006-05-02 02:57:45 +00:00
joey 5cd32c2eee - fix typo
- avoid sending commit mails to the user who made the commit
2006-04-25 20:24:44 +00:00
joey bfa96ad282 prevent users from registering with name that is not a valid wikifile
avoids XSS attacks and is generally a good limitation
2006-04-25 05:53:22 +00:00
joey 1f06b39788 fix a deadloop if from ended in a / 2006-04-25 01:15:20 +00:00
joey b7f64d884c subscription nearly done 2006-04-25 00:22:41 +00:00
joey 13e3bf8671 commit changes for email subscriptions 2006-04-24 23:09:26 +00:00
joey 3ff14ce12a fix --anonok 2006-04-14 18:10:18 +00:00
joey 46302e698d Verified that the action parameter on cgi forms is needed for at least the
prefs form. Use $config{cgiurl}.
2006-04-04 18:43:26 +00:00
joey 5cdcec9f49 comment out action => $q->request_uri setting, which is reporedly
unnecessary and doesn't work with old CGI.pm's (it's an undocumented
variable)
2006-04-02 22:28:08 +00:00
joey c4e0e8c36c - add <base> to cgi output, this is especially useful for output containing
wikilinks since the urls should work now in more situations
- drop --limit from svn log run, since a) it needs a fairly new svn and 
  b) in some cases, it would limit it to too few entries to display the
  requested number of changes
- Use driver:DB_File and not driver:db_file for better compatability with
  old versions of CGI::Session.
- Note that HTML::Template 3.02.02 is needed.
2006-04-02 22:24:08 +00:00
joey 9922c37d73 improved logic 2006-03-30 00:17:28 +00:00
joey 0d9539d577 added --hyperestraier switch, which turns on search support
(ok, the way I run estseek.cgi is admittedly pretty nasty, but it works..)
2006-03-29 22:21:23 +00:00
joey efe91335c6 improve fix for symlink attacks to check subdirectories for symlinks too
before writing
2006-03-29 18:50:36 +00:00
joey 2a16e15122 fix for replacing from underlay 2006-03-29 18:35:04 +00:00
joey 975ae0944c Implemented --underlaydir, and moved files provided by underlay out of doc
so I don't need to maintain two copies anymore.

You might also want to remove the files provided in the basewiki underlay
from your wiki, if you have not created custom local versions of them, so
that these pages will be automatically updated in future ikiwiki upgrades.
2006-03-29 18:21:01 +00:00
joey 5591d621b9 css support 2006-03-29 07:24:03 +00:00
joey e41dd1e24e html validation fixes:
- escape & in urls (also clean up cgi url generation)
 - since markdown wraps inlined pages in <p></p>, close and re-open
   the paragraph tags when generating the embedded html
 - added XHTML 1.0 doctypes to templates
 - fixed <hr /> and <br /> in templates
 - add an alt attribute to inline images, based on the WikiLink to the
   image. Allows things like [[my_image|img.png]] to customise alt text.
2006-03-29 03:18:21 +00:00
joey 0a95ac2144 Improved handling of wikilinks containing characters that are not allowed
in filenames. Now converts to valid filenames automatically.

Note, need to --refresh your wiki after updating to this version, if you
use any pages with __nn__ in their names.
2006-03-29 02:14:55 +00:00
joey b5656f595d Change the name of the session cookie. This will avoid problems with
multiple wikis on the same host.
2006-03-29 00:21:57 +00:00
joey bce9a327c3 Put in a quick fix for a bug involving page preview while creating a page
that caused the page location to be changed to a subdir. This is not a very
good fix.
2006-03-28 22:56:56 +00:00
joey ffc0be87d7 add --refresh and make it with with --setup 2006-03-26 05:08:41 +00:00
joey da1f96550e don't keep the wiki locked while rendering recentchanges 2006-03-26 04:32:41 +00:00
joey bb8096264e don't escape "/" in title when making a blog entry, allow creating a subdir 2006-03-26 02:49:34 +00:00
joey efb605ded6 finish up the blog form 2006-03-24 05:33:23 +00:00
joey 49524c429e add blog post template 2006-03-24 05:03:16 +00:00
joey ad4760ad78 load index for all cgi scripts, fixes links on RecentChanges 2006-03-23 22:11:05 +00:00
joey 384327bfd0 proper main sub and loadindex optimisation for cgis 2006-03-23 07:51:52 +00:00
joey 6c8cf5dd57 Major code reoganisation, splitting up the single big file. The two goals
kept in mind during this are a) to reduce load time for common cases like
cgi and post-commit and b) make the code easier to navigate.

This also modularises RCS support to the extent that it should be possible
to drop in a module for some RCS other than svn, add a switch for it, and
it pretty much just work.

High chance I missed an edge case that breaks something, this is only
barely tested at this point.
2006-03-23 06:51:15 +00:00