Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#370 closed defect (fixed)

Login Error

Reported by: anonymous Owned by: Matt Good
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.9

Description (last modified by Noah Kantrowitz)

Hey, I'm been trying to get Trac setup now for a little while and seem to have got pretty much everything working expect for login. I installed the AccountManagerPlugin and AuthFormPlugin, both of which seemed to install fine. Login and Registration are both show in the menubar, and I can click on login and it will take me to the login box. When I type my username and password in (which have been added) I get the error


Oops...

Trac detected an internal error:

unsupported operand type(s) for +: 'NoneType' and 'str' Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/trac/web/cgi_frontend.py", line 130, in run
     dispatch_request(req.path_info, req, env)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 139, in dispatch_request
     dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 79, in dispatch
     req.authname = self.authenticate(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 66, in authenticate
      authname = authenticator.authenticate(req)
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 160, in wrap
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 167, in authenticate
File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 189, in _remote_user
File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 94, in check_password
File "build/bdist.linux-i686/egg/acct_mgr/htfile.py", line 59, in check_password
File "build/bdist.linux-i686/egg/acct_mgr/htfile.py", line 119, in prefix

TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Which seemed very similar to http://projects.edgewall.com/trac/changeset/1710 and http://projects.edgewall.com/trac/ticket/1522 . i edited the Browser.py file and changed the line but I am still getting the same error.The apache config looks like:

<VirtualHost? *:3000>
    ServerName? domain.com
    DocumentRoot? /var/www/domain.com/htdocs
<Directory /var/www/domain.com/htdocs>
    AllowOverride: all Options +Indexes +FollowSymLinks:
</Directory> </VirtualHost> <Location /Framework/svn>
<IfDefine: SVN>
     DAV svn
     SVNPath /var/svn/repos
     SVNIndexXSLT /Framework/trac/svnindex.xsl
</IfDefine>
<LimitExcept? GET PROPFIND OPTIONS REPORT>
        AuthType: Basic
        AuthName: "Framework::svn"
</LimitExcept>
</Location>
<Location /Framework>
SetEnv TRAC_ENV "/var/lib/trac/Framework"
</Location>
<Location /login>
   AuthType: Basic
   AuthName: "Framework::trac"
   AuthUserFile: /var/lib/trac/trac.htpasswd
   Require valid-user
</Location>

Alias /Framework/trac /var/www/domain.com/htdocs/Framework/trac
ScriptAlias? /Framework /var/www/domain.com/cgi-bin/trac.cgi
Redirect /login http://domain.com/Framework/login

I'm installing on Gentoo 2-6-15. Any more info needed, let me know!

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by Alec Thomas

Component: TracHacksAccountManagerPlugin
Owner: changed from Alec Thomas to Matt Good

comment:2 Changed 11 years ago by Noah Kantrowitz

Description: modified (diff)

Fixing formatting.

comment:3 Changed 11 years ago by Matt Good

Resolution: fixed
Status: newclosed

(In [1047]) skip password test if either "user" or "password" values from login form are missing (fixes #370)

comment:4 Changed 11 years ago by Matt Good

Using the AuthFormPlugin with the AccountManagerPlugin is redundant since this plugin has its own login form. Also, you should not use the AccountManager login form if you're using HTTP authentication for Trac (you can use HTTP authentication for SVN and the login form for Trac if you want).

However, in r1047 I've updated the code so you get a standard login error message if you've tried to post to the AccountManager's login without the proper form values instead of the obscure exception in the description.

Modify Ticket

Action
as closed The owner will remain Matt Good.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.