changeset 5360:71d0252a92a9

xmlrpc.renamePage: convert pagename to internal representation
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 08 Dec 2009 15:52:54 +0100
parents 92fdc2ecbad5
children c3b6639e101a
files MoinMoin/xmlrpc/__init__.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/xmlrpc/__init__.py	Tue Dec 08 15:25:42 2009 +0100
+++ b/MoinMoin/xmlrpc/__init__.py	Tue Dec 08 15:52:54 2009 +0100
@@ -588,6 +588,13 @@
         @rtype: bool
         @return: True on success
         """
+
+        pagename = self._instr(pagename)
+        pagename = wikiutil.normalize_pagename(pagename, self.cfg)
+        if not pagename:
+            return xmlrpclib.Fault("INVALID", "pagename can't be empty")
+
+        # check ACLs
         if not (self.request.user.may.delete(pagename) and self.request.user.may.write(newpagename)):
             return xmlrpclib.Fault(1, "You are not allowed to rename this page")
         editor = PageEditor(self.request, pagename)