Edgewall Software

Ticket #326 (closed defect: fixed)

Opened 5 years ago

Last modified 4 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:

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

Changed 5 years ago by daniel

  • milestone set to 0.7

Changed 5 years ago by jonas

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

Changed 5 years ago by daniel@…

Using Safari. :)

Changed 5 years ago by daniel@…

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

Changed 5 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?

Changed 5 years ago by daniel@…

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

Changed 5 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'

Changed 5 years ago by jonas

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

Changed 4 years ago by daniel

  • milestone changed from 0.7.1 to 0.8

Changed 4 years ago by jonas

  • status changed from new to closed
  • resolution set to fixed
  • description modified (diff)

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

Changed 4 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) ?

Changed 4 years ago by eblotml@…

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 4 years ago by eblotml@…

  • status changed from reopened to closed
  • resolution set to fixed

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.

Add/Change #326 (tracd fails to perform login/authentication)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.