Skip to content

Commit 0b94ad3

Browse files
committed
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.
1 parent f8b3a0c commit 0b94ad3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ Fixed:
4242
thanks Nathan Russell. (John Kristensen)
4343
- issue2550756: Fix `oder' typo in mailer.Mailer.bounce_message docstring,
4444
thanks W. Trevor King (John Kristensen)
45+
- Fix basic authentication: instatiating the login action would fail if
46+
the user is not set. We now first set the user to anonymous and then
47+
try basic authentication if enabled.
4548

4649

4750
2012-05-15: 1.4.20

roundup/cgi/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,10 @@ def determine_user(self):
706706
pass
707707
username, password = decoded.split(':', 1)
708708
try:
709+
# Current user may not be None, otherwise
710+
# instatiation of the login action will fail.
711+
# So we set the user to anonymous first.
712+
self.make_user_anonymous()
709713
login = self.get_action_class('login')(self)
710714
login.verifyLogin(username, password)
711715
except LoginError, err:

0 commit comments

Comments
 (0)