changeset 3435:1a95fc180bdd

xmlrpc applyAuthToken: give good error msg for empty token, avoid CachingError 'is a directory' (port from 1.6)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 30 Mar 2008 00:13:49 +0100
parents d82ad8caaf1f
children 7b96b91b9206
files MoinMoin/xmlrpc/__init__.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/xmlrpc/__init__.py	Thu Mar 20 21:16:41 2008 +0100
+++ b/MoinMoin/xmlrpc/__init__.py	Sun Mar 30 00:13:49 2008 +0100
@@ -708,6 +708,9 @@
 
     def xmlrpc_applyAuthToken(self, auth_token):
         """ Applies the auth token and thereby authenticates the user. """
+        if not auth_token:
+            return xmlrpclib.Fault("INVALID", "Empty token.")
+
         id_handler = XmlRpcAuthTokenIDHandler(auth_token)
 
         u = self.request.cfg.session_handler.start(self.request, id_handler)