changeset 3607:691dc24ee12e

deny access on invalid input (happens only with spammers anyway)
author Johannes Berg <johannes AT sipsolutions DOT net>
date Sat, 17 May 2008 11:49:55 +0200
parents 510022f50e79
children 3d5985a65342
files MoinMoin/request/__init__.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/request/__init__.py	Sat May 17 11:24:15 2008 +0200
+++ b/MoinMoin/request/__init__.py	Sat May 17 11:49:55 2008 +0200
@@ -181,7 +181,11 @@
                 self.action = 'xmlrpc'
                 self.rev = None
             else:
-                self.args = self.form = self.setup_args()
+                try:
+                    self.args = self.form = self.setup_args()
+                except UnicodeError:
+                    self.makeForbidden(403, "The input you sent could not be understood.")
+                    return
                 self.action = self.form.get('action', ['show'])[0]
                 try:
                     self.rev = int(self.form['rev'][0])