changeset 756:df1f57a8a286

Fix to the getAttachment XMLRPC method.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Thu, 08 Jun 2006 12:49:22 +0200
parents 0ba3bd233965
children 38914e43f0dd
files MoinMoin/xmlrpc/__init__.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/xmlrpc/__init__.py	Thu Jun 08 11:41:13 2006 +0200
+++ b/MoinMoin/xmlrpc/__init__.py	Thu Jun 08 12:49:22 2006 +0200
@@ -412,7 +412,7 @@
         
         result = AttachFile._get_files(self.request, pagename)
         return result
-        
+
     def xmlrpc_getAttachment(self, pagename, attachname):
         """ Get attachname associated with pagename
         
@@ -425,13 +425,13 @@
         # User may read page?
         if not self.request.user.may.read(pagename):
             return self.notAllowedFault()
-        
-        filename = wikiutil.taintfilename(filename)
-        filename = AttachFile.getFilename(self.request, pagename, attachname)
+
+        filename = wikiutil.taintfilename(self._instr(attachname))
+        filename = AttachFile.getFilename(self.request, pagename, filename)
         if not os.path.isfile(filename):
             return self.noSuchPageFault()
         return self._outlob(open(filename, 'rb').read())
-        
+
     def xmlrpc_putAttachment(self, pagename, attachname, data):
         """ Set attachname associated with pagename to data