Opened 21 years ago
Closed 20 years ago
#326 closed defect (fixed)
tracd fails to perform login/authentication
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | 0.8 |
Component: | web frontend/tracd | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
When I click on login, I get:
Oops... Trac detected an internal error: TracHTTPRequestHandler instance has no attribute 'authname' Traceback (most recent call last): File "/var/repositories/trac/scripts/tracd", line 228, in do_trac_req self.do_real_trac_req() File "/var/repositories/trac/scripts/tracd", line 240, in do_real_trac_req self.remote_user = self.env.auth.do_auth(self) File "/var/repositories/trac/scripts/tracd", line 98, in do_auth if not 'Authorization' in req.headers or \ File "/usr/lib/python2.2/rfc822.py", line 390, in __getitem__ return self.dict[name.lower()] AttributeError: 'int' object has no attribute 'lower'
I'm using [474]. I'm tunneling over SSH to talked to the port tracd is running on. I have my own htdigest file setup.
Attachments (0)
Change History (13)
comment:1 by , 21 years ago
Milestone: | → 0.7 |
---|
comment:2 by , 21 years ago
comment:5 by , 21 years ago
Milestone: | 0.7 → 0.7.1 |
---|
I'm unable to reproduce this with mozilla-firefox or safari.
Does this still happen with the latest version of trunk?
comment:6 by , 21 years ago
In the next couple of days, I'll try upgrading, and see if login start working.
comment:7 by , 21 years ago
Just upgraded to [540]. New Error message.
Oops... Trac detected an internal error: 'NoneType' object has no attribute 'do_auth' Traceback (most recent call last): File "/var/repositories/trac/scripts/tracd", line 228, in do_trac_req self.do_real_trac_req() File "/var/repositories/trac/scripts/tracd", line 240, in do_real_trac_req self.remote_user = self.env.auth.do_auth(self) AttributeError: 'NoneType' object has no attribute 'do_auth'
comment:8 by , 21 years ago
Did you start tracd with the "-a projenvdir,/path/to/htddigtest.file,your.realm" option?
comment:9 by , 21 years ago
Milestone: | 0.7.1 → 0.8 |
---|
comment:10 by , 20 years ago
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Ok, closing this one now, please reopen if you can reproduce this…
comment:11 by , 20 years ago
Summary: | tracd not asking for login → tracd fails to perform login/authentication |
---|
Go the same issue than daniel@…:
Oops... Trac detected an internal error: 'NoneType' object has no attribute 'do_auth' Traceback (most recent call last): File "bin/tracd", line 235, in do_trac_req self.do_real_trac_req() File "bin/tracd", line 245, in do_real_trac_req self.remote_user = self.env.auth.do_auth(self) AttributeError: 'NoneType' object has no attribute 'do_auth'
Where does self.env
get assigned a auth
instance ?
From top dir:
$> find . -type f -exec grep -nH do_auth {} \; ./bin/tracd:98: def do_auth(self, req): ./bin/tracd:245: self.remote_user = self.env.auth.do_auth(self)
It seems there is no such a do_auth
method defined in trac package …
May be a version mismatch (I'm using Trac from SVN, checked out this evening) ?
comment:12 by , 20 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:13 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I guess I got it:
If project in --auth [project],[htdigest_file],[realm]
does not match the Trac database name,
auths.get(project, None)
in tracd
returns the None object, which causes the later failure.
In other words, current implementation of tracd
enforces that in
tracd --auth <project>,htdigest_file,realm <database>
project == database
if project is not equal to database are different, Auth is null
, and the tracd
leaves with the reported stack trace.
It looks like BaseHTTPServer/rfc822.py has problem parsing http headers. What browser are you using?