Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#326 closed defect (fixed)

tracd fails to perform login/authentication

Reported by: daniel@… 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:

Description (last modified by Jonas Borgström)

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 daniel, 15 years ago

Milestone: 0.7

comment:2 by Jonas Borgström, 15 years ago

It looks like BaseHTTPServer/rfc822.py has problem parsing http headers. What browser are you using?

comment:3 by daniel@…, 15 years ago

Using Safari. :)

comment:4 by daniel@…, 15 years ago

A coworker on Mozilla is not getting in. (So it's not just Safari)

comment:5 by Jonas Borgström, 15 years ago

Milestone: 0.70.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 daniel@…, 15 years ago

In the next couple of days, I'll try upgrading, and see if login start working.

comment:7 by daniel@…, 15 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 Jonas Borgström, 15 years ago

Did you start tracd with the "-a projenvdir,/path/to/htddigtest.file,your.realm" option?

comment:9 by daniel, 15 years ago

Milestone: 0.7.10.8

comment:10 by Jonas Borgström, 15 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

Ok, closing this one now, please reopen if you can reproduce this…

comment:11 by eblotml@…, 15 years ago

Summary: tracd not asking for logintracd 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 eblotml@…, 15 years ago

Resolution: fixed
Status: closedreopened

comment:13 by eblotml@…, 15 years ago

Resolution: fixed
Status: reopenedclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.