changeset 450:0a58e95d21a4

add poor man's spam protection
author Radomir Dopieralski <moindev@sheep.art.pl>
date Sun, 03 Aug 2008 00:40:27 +0200
parents 1edf04d1b444
children 858612e601cb
files dandelion/editor.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dandelion/editor.py	Sun Aug 03 00:30:02 2008 +0200
+++ b/dandelion/editor.py	Sun Aug 03 00:40:27 2008 +0200
@@ -40,6 +40,9 @@
     if parent is None:
         raise Forbidden()
     if data is not None:
+        # XXX Poor man's spam protection
+        if 'href=' in data or 'href=' in comment or 'MESSAGE' in comment:
+            raise Forbidden()
         if data == "":
             page.remove(author, comment)
             wiki.search_index.add(page.title, u"")