ikiwiki/doc
Joey Hess 72b5ef2c5f Fix CSRF attacks against the preferences and edit forms. Closes: #475445
The fix involved embedding the session id in the forms, and not allowing the
forms to be submitted if the embedded id does not match the session id.

In the case of the preferences form, if the session id is not embedded,
then the CGI parameters are cleared. This avoids a secondary attack where the
link to the preferences form prefills password or other fields, and
the user hits "submit" without noticing these prefilled values.

In the case of the editpage form, the anonok plugin can allow anyone to edit,
and so I chose not to guard against CSRF attacks against users who are not
logged in. Otherwise, it also embeds the session id and checks it.

For page editing, I assume that the user will notice if content or commit
message is changed because of CGI parameters, and won't blndly hit save page.
So I didn't block those CGI paramters. (It's even possible to use those CGI
parameters, for good, not for evil, I guess..)

The only other CSRF attack I can think of in ikiwiki involves the poll plugin.
It's certianly possible to set up a link that causes the user to unknowingly
vote in a poll. However, the poll plugin is not intended to be used for things
that people would want to attack, since anyone can after all edit the poll page
and fill in any values they like. So this "attack" is ignorable.
2008-04-10 16:35:30 -04:00
..
banned_users
basewiki
bugs
contact
css_market
examples
forum
ikiwiki
ikiwiki-mass-rebuild
ikiwikiusers
index
install
logo
news web commit by http://sabr.myopenid.com/ 2008-04-09 17:45:06 -04:00
plugins
post-commit
rcs
roadmap
sandbox
security
setup
smileys
soc
tags
templates
tips
todo
translation
usage
users
w3mmode
wikiicons
GPL
TourBusStop.mdwn
backlinks.mdwn
banned_users.mdwn
basewiki.mdwn
bugs.mdwn
cgi.mdwn
commit-internals.mdwn
contact.mdwn
css.mdwn
css_market.mdwn
download.mdwn
examples.mdwn
favicon.ico
features.mdwn
forum.mdwn
freesoftware.mdwn
git.mdwn
hyperestraier.mdwn
ikiwiki-makerepo.mdwn
ikiwiki-mass-rebuild.mdwn
ikiwiki-transition.mdwn
ikiwiki-update-wikilist.mdwn
ikiwiki.mdwn
ikiwiki.setup
ikiwikiusers.mdwn
index.mdwn
install.mdwn
local.css
logo.mdwn
news.mdwn
page_locking.mdwn MAJOR basewiki reorg 2007-12-08 15:59:08 -05:00
pagehistory.mdwn
patch.mdwn
plugins.mdwn
post-commit.mdwn
rcs.mdwn
recentchanges.mdwn
roadmap.mdwn
sandbox.mdwn
security.mdwn
setup.mdwn remove incorrect comment 2008-02-29 22:42:27 -05:00
shortcuts.mdwn
sitemap.mdwn
smileys.mdwn
soc.mdwn
style.css
tags.mdwn
templates.mdwn
tipjar.mdwn
tips.mdwn
todo.mdwn
translation.mdwn
usage.mdwn
users.mdwn
w3mmode.mdwn
whyikiwiki.mdwn
wikitemplates.mdwn
wishlist.mdwn