Opened 12 years ago

Closed 12 years ago

Last modified 12 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


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/", line 130, in run
     dispatch_request(req.path_info, req, env)
File "/usr/lib/python2.4/site-packages/trac/web/", line 139, in dispatch_request
File "/usr/lib/python2.4/site-packages/trac/web/", line 79, in dispatch
     req.authname = self.authenticate(req)
File "/usr/lib/python2.4/site-packages/trac/web/", line 66, in authenticate
      authname = authenticator.authenticate(req)
File "build/bdist.linux-i686/egg/acct_mgr/", line 160, in wrap
File "build/bdist.linux-i686/egg/acct_mgr/", line 167, in authenticate
File "build/bdist.linux-i686/egg/acct_mgr/", line 189, in _remote_user
File "build/bdist.linux-i686/egg/acct_mgr/", line 94, in check_password
File "build/bdist.linux-i686/egg/acct_mgr/", line 59, in check_password
File "build/bdist.linux-i686/egg/acct_mgr/", line 119, in prefix

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

Which seemed very similar to and . i edited the file and changed the line but I am still getting the same error.The apache config looks like:

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

Alias /Framework/trac /var/www/
ScriptAlias? /Framework /var/www/
Redirect /login

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

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by Alec Thomas

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

comment:2 Changed 12 years ago by Noah Kantrowitz

Description: modified (diff)

Fixing formatting.

comment:3 Changed 12 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 12 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

Change Properties
Set your email in Preferences
as closed The owner will remain Matt Good.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.