Package: trac Version: 0.11.7-4 I've configured trac to use libapache2-mod-auth-openid for authentication.
I've written a custom login page for libapache2-mod-auth-openid that
includes a post value for referer that is set to the original web page
that user was on when they clicked the login link.
I expect the user to be redirected to this page after a successful
login.
Instead, after logging in, I'm returned to trac and get the error:
Trac detected an internal error:
AttributeError: 'list' object has no attribute 'startswith'
I've fixed the error with the following patch:
--- /usr/share/pyshared/trac/web/auth.py.orig 2011-07-19 09:55:03.000000000
-0400
+++ /usr/share/pyshared/trac/web/auth.py 2011-07-19 10:31:35.000000000 -0400
@@ -209,7 +209,7 @@
req.redirect(referer or req.abs_href())
def _referer(self, req):
- return req.args.get('referer') or req.get_header('Referer')
+ return req.args.getfirst('referer') or req.get_header('Referer')
class HTTPAuthentication(object):
signature.asc
Description: Digital signature

