Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#309 closed defect (worksforme)

Accountmanagerplugin error: when enabling the loginmodule

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

Description

hi, i get the following error when i try to login with valid login credentials on my newly setup trac: --- Oops...

Trac detected an internal error:

'ModPythonRequest' object has no attribute 'environ' Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 206, in handler

dispatch_request(mpr.path_info, mpr, env)

File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 139, in dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 79, in dispatch

req.authname = self.authenticate(req)

File "/usr/lib/python2.3/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

AttributeError: 'ModPythonRequest' object has no attribute 'environ'


This error comes as soon as i enable the following line in trac.ini: acct_mgr.web_ui.loginmodule = enabled

if i disable it, i can use the in-built trac login module and everything works except accountmanagerplugin. I can even switch to form based login and authenticate if i want. here is the relevant trac.ini: [components] webadmin.* = enabled acct_mgr.web_ui.registrationmodule = disabled acct_mgr.web_ui.loginmodule = enabled trac.web.auth.loginmodule = disabled acct_mgr.api.accountmanager = enabled acct_mgr.web_ui.accountmodule = enabled acct_mgr.htfile.htpasswdstore = enabled acct_mgr.htfile.abstractpasswordfilestore = enabled

[account-manager] password_format = htpasswd password_file = /media/repo/TRAC/trac.htpasswd

And here is the current apache config for trac: <Location "/UNIX_Solutions">

SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /media/repo/TRAC/UNIX_Solutions SetEnv PYTHON_EGG_CACHE /tmp/.python-cache

# PythonOption TracUriRoot /projects/myproject </Location>

# i have commented the following. because if i enable this, the regular htpasswd authentication starts to work. #<Location "/UNIX_Solutions/login"> # AuthType Basic # AuthName "UNIX Solutions Restricted Access" # AuthUserFile /media/repo/TRAC/trac.htpasswd # Require valid-user #</Location>

# This is needed for authform #Redirect /login http://silinux1/UNIX_Solutions/login

Hope you can help.

Thanks Akshay

Attachments (0)

Change History (2)

comment:1 Changed 11 years ago by Matt Good

Resolution: worksforme
Status: newclosed

You're trying to use the "trunk" version of the AccountManangerPlugin on Trac 0.9. This will not work. You need to use the plugin from the "0.9" folder.

comment:2 Changed 11 years ago by Akshay Guleria

thanks much. that worked.

Modify Ticket

Change Properties
Set your email in Preferences
Action
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.