Skip to content

Commit

Permalink
Fix authz for use with twisted's distrib proxy.
Browse files Browse the repository at this point in the history
The PB remote proxy for addCookie only accepts two positional arguments, and
the rest must be keyword arguments.
  • Loading branch information
tomprince committed Sep 22, 2012
1 parent 0070ad2 commit c61e59b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/status/web/authz.py
Expand Up @@ -168,7 +168,7 @@ def login(self, request):
def check_authenticate(res):
if res:
cookie, s = self.sessions.new(user, self.auth.getUserInfo(user))
request.addCookie(COOKIE_KEY, cookie, s.getExpiration(),path="/")
request.addCookie(COOKIE_KEY, cookie, expires=s.getExpiration(),path="/")
request.received_cookies = {COOKIE_KEY:cookie}
return cookie
else:
Expand Down
4 changes: 2 additions & 2 deletions master/buildbot/test/unit/test_status_web_authz_Authz.py
Expand Up @@ -34,8 +34,8 @@ def getUser(self):

def getPassword(self):
return None
def addCookie(self, key, cookie, expiration, path):
self.send_cookies.append((key, cookie, expiration, path))
def addCookie(self, key, cookie, expires, path):
self.send_cookies.append((key, cookie, expires, path))

class StubHttpAuthRequest(object):
# all we need from a request is username/password
Expand Down

0 comments on commit c61e59b

Please sign in to comment.