[Moin-devel] xmlrpc2 putpage and authorization

Gerhard Reitmayr reitmayr at ims.tuwien.ac.at
Wed Nov 17 13:18:01 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Thomas Waldmann wrote:
|> I'm trying to interface to a MoinMoin wiki using the xmlrpc2 action. The
|> particular version is Release 1.2.1 [Revision 1.184].
|
|
| Better use 1.2.4. Or even 1.3beta5 :)

thanks for the help. I now use 1.3beta5 running the server with twisted
without a dedicated server. And I'm using the BasicAuthTransport from as
shown in the scripts I mentioned.

I found that I had to apply the following patch to MoinMoin/request.py
to get it to work with twisted:

- --- C:\projects\moin-1.3beta5\MoinMoin\request.py	Fri Nov 12 22:15:38 2004
+++ C:\Programme\Python23\Lib\site-packages\MoinMoin\request.py	Wed Nov
17 22:07:28 2004
@@ -1154,7 +1154,7 @@
~         else:
~             self.query_string = ''
~         self.outputlist = []
- -        self.auth_username = None # TODO, see: self.twistd.user /
.password (http auth)
+        self.auth_username = self.twistd.getUser()
~         RequestBase.__init__(self, properties)
~         #print "request.RequestTwisted.__init__: received_headers=\n" +
str(self.twistd.received_headers)

basically, the auth_username was not set from the twisted request object
and therefore the user was still not trusted. anyway with this fix it
works now.

bye,
~  Gerhard Reitmayr


|> All the getYYYY calls work fine but putPage always returns
|> {'faultCode': 1, 'args': [], 'faultString': 'You are not allowed to edit
|> this page'}
|> using the python xmlrpclib.
|
|
| There is sample code under MoinMoin/scripts/...
|
| You also may need to slightly modify the MoinMoin/wikirpc.py code as
| putpage is disabled by default for security reasons.
|
|
|
| -------------------------------------------------------
| This SF.Net email is sponsored by: InterSystems CACHE
| FREE OODBMS DOWNLOAD - A multidimensional database that combines
| robust object and relational technologies, making it a perfect match
| for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
| _______________________________________________
| Moin-devel mailing list
| Moin-devel at lists.sourceforge.net
| https://lists.sourceforge.net/lists/listinfo/moin-devel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)

iD8DBQFBm7+dnsud5Wp0x/wRAtaoAJ4uM1kL6dUkFqX+aN4hGNIXpFsfcwCgrrf5
shmbntL0nOGbUALnpgaqOdA=
=DYS4
-----END PGP SIGNATURE-----




More information about the Moin-devel mailing list