Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#6329 closed defect (duplicate)

Login with SessionStore not working after upgrade to Trac 0.11.6

Reported by: klaus@… Owned by: Matt Good
Priority: high Component: AccountManagerPlugin
Severity: major Keywords: SessionStore, 0.11.6, LogIn
Cc: Trac Release: 0.11



for the WebsiteBaker TRAC installation we have your AccountManagerPlugin installed sind I took over the management ( of this server.

Yesterday I upgraded the TRAC Version to 0.11.6 and at first glance had no issue, everything seemd fine. I logged off (the session was still OK and tried to log back in this morning and get following error:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 377, in send_error
  File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 733, in render_template
    message = req.session.pop('chrome.%s.%d' % (type_, i))
  File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 195, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 265, in _get_session
    return Session(self.env, req)
  File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 149, in __init__
    if req.authname == 'anonymous':
  File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 195, in __getattr__
    value = self.callbacks[name](self)
  File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 134, in authenticate
    authname = authenticator.authenticate(req)
  File "build/bdist.linux-x86_64/egg/acct_mgr/", line 430, in wrap
  File "build/bdist.linux-x86_64/egg/acct_mgr/", line 440, in authenticate
  File "build/bdist.linux-x86_64/egg/acct_mgr/", line 467, in _remote_user
  File "build/bdist.linux-x86_64/egg/acct_mgr/", line 140, in check_password
  File "build/bdist.linux-x86_64/egg/acct_mgr/", line 76, in check_password
  File "build/bdist.linux-x86_64/egg/acct_mgr/", line 52, in check_hash
  File "build/bdist.linux-x86_64/egg/acct_mgr/", line 48, in generate_hash
  File "build/bdist.linux-x86_64/egg/acct_mgr/", line 56, in _encode
AttributeError: 'NoneType' object has no attribute 'encode'

First I uninstalled and reinstalled the Version for the 0.11 release of your plugin to no avail. Then I installed the latest release (TracAccountManager-0.2.1dev_r7165-py2.4.egg) which is meant for the 0.12 release of TRAC, but I figured it wouldn't matter, worth trying. No change to current status.

From what I can figure, I am missing something in the configuration, which also makes me wonder why it worked before. Anyway, here is part of my trac.ini

account_changes_notify_addresses =
force_passwd_change = false
hash_method = HtDigestHashMethod
notify_actions = new
password_file = /home/wb/conf/.htpasswd
password_store = SessionStore

acct_mgr.* = enabled
acct_mgr.web_ui.EmailVerificationModule = disabled
acct_mgr.htfile.HtDigestStore = disabled
acct_mgr.htfile.HtPasswdStore = disabled
acct_mgr.http.HttpAuthStore = disabled
acct_mgr.db.SessionStore = enabled
acct_mgr.pwhash.htpasswdhashmethod = disabled
acct_mgr.pwhash.htdigesthashmethod = enabled
acct_mgr.svnserve.* = disabled
acct_mgr.admin.AccountManagerAdminPage = enabled
acct_mgr.web_ui.AccountModule = enabled
acct_mgr.web_ui.RegistrationModule = disabled
acct_mgr.web_ui.EmailVerificationModule = disabled
ticketdelete.* = enabled
trac.web.auth.loginmodule = disabled
tracnav.tracnav.tracnav = enabled
tracspamfilter.* = enabled
tracusermanager.* = enabled

I hope this is enough to help me out ;-)



Attachments (0)

Change History (7)

comment:1 Changed 13 years ago by anonymous

Hi there,

i had the same problem with 11.6 when adding a new user. the traces show that acct_mgr.pwhash.HtDigestHashMethod.realm is not set.

this worked for me:

; the name of the authentication "realm"
; it can be any text to identify your site or project
htdigest_realm = TracRealm

setting htdigest_realm in the trac.ini solved the problem.

kind regards


comment:2 Changed 13 years ago by anonymous

Same problem here. setting htdigest_realm solved the problem (but had to reset the password afterwards), thanks this saved my day.

comment:3 Changed 13 years ago by anonymous

Hi, setting htdigest_realm = solves the problem too, without having to change or reset passwords

comment:4 Changed 13 years ago by Steffen Hoffmann

a random 'htdigest_realm' entry saved my day too, many thanks to anonymous alias Marc[[BR]] password reset required for all users here too

(first I needed an new account with TRAC_ADMIN permission to reset password of my current trac-admin account - not a small pain)

now thinking, how to do upcoming migration on production system this test was made for ...

tested here with

trac 0.12dev-r9115 acct_mgr 0.2.1dev_r7165-py2.5.egg

comment:5 Changed 13 years ago by klaus@…

Hi Guys,

unfortunatly this does not seem to work for our environment, at least not with the session store DB

acct_mgr.db.SessionStore = enabled

Currently we am using the htdigest sessionstore

acct_mgr.htdigest_realm = TracRealm
acct_mgr.htfile.htdigeststore = enabled
acct_mgr.htfile.htdigeststore = enabled

What I wonder now, is if we need to "change" the ini setting to

acct_mgr.htfile.htdigest_realm = TracRealm
acct_mgr.htfile.htdigeststore = enabled

to make it work with the sessions tore, or to change it completly to

acct_mgr.db.htdigest_realm = TracRealm

Further help is apreciated ...



comment:6 Changed 13 years ago by John Hampton

Resolution: duplicate
Status: newclosed

This is a duplicate of #6453 (or that is a dup of this, whatever). You can find the solution there. I will commit a patch in the next day or two.

comment:7 in reply to:  6 Changed 13 years ago by anonymous

Replying to pacopablo:

This is a duplicate of #6453 (or that is a dup of this, whatever). You can find the solution there. I will commit a patch in the next day or two.

Would have been more sensible to close the newer ticket as dup. But I see, that you posted relevant information there, probably before recognizing the older dup here. The proposed simple solution is - of course - highly appreciated. Thanks.

Modify Ticket

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