Ticket #326 (closed defect: fixed)
Opened 8 years ago
Last modified 8 years ago
tracd fails to perform login/authentication
| Reported by: | daniel@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.8 |
| Component: | web frontend/tracd | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
Description (last modified by jonas) (diff)
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
Change History
comment:1 Changed 8 years ago by daniel
- Milestone set to 0.7
comment:2 Changed 8 years ago by jonas
comment:3 Changed 8 years ago by daniel@…
Using Safari. :)
comment:4 Changed 8 years ago by daniel@…
A coworker on Mozilla is not getting in. (So it's not just Safari)
comment:5 Changed 8 years ago by jonas
- Milestone changed from 0.7 to 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 Changed 8 years ago by daniel@…
In the next couple of days, I'll try upgrading, and see if login start working.
comment:7 Changed 8 years ago by daniel@…
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 Changed 8 years ago by jonas
Did you start tracd with the "-a projenvdir,/path/to/htddigtest.file,your.realm" option?
comment:9 Changed 8 years ago by daniel
- Milestone changed from 0.7.1 to 0.8
comment:10 Changed 8 years ago by jonas
- Description modified (diff)
- Resolution set to fixed
- Status changed from new to closed
Ok, closing this one now, please reopen if you can reproduce this…
comment:11 Changed 8 years ago by eblotml@…
- Summary changed from tracd not asking for login to 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 Changed 8 years ago by eblotml@…
- Resolution fixed deleted
- Status changed from closed to reopened
comment:13 Changed 8 years ago by eblotml@…
- Resolution set to fixed
- Status changed from reopened to 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?