]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/security.mdwn
web commit by joey
[ikiwiki.git] / doc / security.mdwn
index c2ddc2424105d8e84e04d38ee06629411bc3eab3..72568a34801ce5da723625f026e8187e71a561b0 100644 (file)
@@ -84,20 +84,7 @@ been no problem yet.
 
 ikiwiki does not expose untrusted data to the shell. In fact it doesn't use
 system() at all, and the only use of backticks is on data supplied by the
-wiki admin. And it runs with taint checks on of course..
-
-## destination directory file replacement
-
-Any file in the destination directory that is a valid page filename can be
-replaced, even if it was not originally rendered from a page. For example,
-ikiwiki.cgi could be edited in the wiki, and it would write out a
-replacement. File permission is preseved. Yipes!
-
-This was fixed by making ikiwiki check if the file it's writing to exists;
-if it does then it has to be a file that it's aware of creating before, or
-it will refuse to create it.
-
-Still, this sort of attack is something to keep in mind.
+wiki admin and untainted filenames. And it runs with taint checks on of course..
 
 ## cgi data security
 
@@ -109,18 +96,33 @@ removing unallowed characters, then making sure it doesn't start with "/"
 or contain ".." or "/.svn/". Annoyingly ad-hoc, this kind of code is where
 security holes breed. It needs a test suite at the very least.
 
+## CGI::Session security
+
+I've audited this module and it is massively insecure by default. ikiwiki
+uses it in one of the few secure ways; by forcing it to write to a
+directory it controls (and not /tmp) and by setting a umask that makes the
+file not be world readable.
+
 ## cgi password security
 
 Login to the wiki involves sending a password in cleartext over the net.
 Cracking the password only allows editing the wiki as that user though.
 If you care, you can use https, I suppose.
 
-## CGI::Session security
+# Fixed holes.
 
-I've audited this module and it is massively insecure by default. ikiwiki
-uses it in one of the few secure ways; by forcing it to write to a
-directory it controls (and not /tmp) and by setting a umask that makes the
-file not be world readable.
+## destination directory file replacement
+
+Any file in the destination directory that is a valid page filename can be
+replaced, even if it was not originally rendered from a page. For example,
+ikiwiki.cgi could be edited in the wiki, and it would write out a
+replacement. File permission is preseved. Yipes!
+
+This was fixed by making ikiwiki check if the file it's writing to exists;
+if it does then it has to be a file that it's aware of creating before, or
+it will refuse to create it.
+
+Still, this sort of attack is something to keep in mind.
 
 ## symlink attacks