diff roundup/cgi/client.py @ 4669:d7ac6c7bc371

Fix basic authentication. Instatiating the login action would fail if the user is not set. We now first set the user to anonymous and then try basic authentication if enabled.
author Ralf Schlatterbeck <rsc@runtux.com>
date Tue, 16 Oct 2012 18:27:33 +0200
parents fc513bd18167
children 23de24f57566
line wrap: on
line diff
--- a/roundup/cgi/client.py	Wed Oct 10 18:19:34 2012 +0200
+++ b/roundup/cgi/client.py	Tue Oct 16 18:27:33 2012 +0200
@@ -706,6 +706,10 @@
                         pass
                     username, password = decoded.split(':', 1)
                     try:
+                        # Current user may not be None, otherwise
+                        # instatiation of the login action will fail.
+                        # So we set the user to anonymous first.
+                        self.make_user_anonymous()
                         login = self.get_action_class('login')(self)
                         login.verifyLogin(username, password)
                     except LoginError, err:

Roundup Issue Tracker: http://roundup-tracker.org/