changeset 3049:ed9b1e5cf0e1

fix MoinMoinBugs/XmlRpcPutPageAllowsEmptyPageName (thanks to Jonas Wagner) (ported from 1.6)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 19 Feb 2008 23:21:58 +0100
parents 1e9444f35a22
children f0250b5a6982
files MoinMoin/xmlrpc/__init__.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/xmlrpc/__init__.py	Tue Feb 19 23:18:27 2008 +0100
+++ b/MoinMoin/xmlrpc/__init__.py	Tue Feb 19 23:21:58 2008 +0100
@@ -527,6 +527,9 @@
 
         pagename = self._instr(pagename)
 
+        if not pagename:
+            return xmlrpclib.Fault("INVALID", "pagename can't be empty")
+
         # check ACLs
         if not self.request.user.may.write(pagename):
             return xmlrpclib.Fault(1, "You are not allowed to edit this page")