Opened 13 years ago
Last modified 12 years ago
#8918 closed defect
Wrong key name in source code, auth.py line 165 — at Initial Version
Reported by: | Owned by: | John Hampton | |
---|---|---|---|
Priority: | normal | Component: | DirectoryAuthPlugin |
Severity: | critical | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
There is an error in the source code, auth.py, line 165. I believe the line should read:
for e in attrs['proxyAddresses']:
Currently, I am getting a KeyError since the attribute from Active Directory should be proxyAdresses not proxyAdress.
Error log:
Traceback (most recent call last):
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\api.py", line 440, in send_error
data, 'text/html')
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\chrome.py", line 833, in render_template
data = self.populate_data(req, data)
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\chrome.py", line 744, in populate_data
'context': req and Context.from_request(req) or None,
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\mimeview\api.py", line 156, in from_request
perm = req.perm
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\api.py", line 216, in getattr
value = self.callbacks[name](self)
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\main.py", line 293, in _get_perm
if isinstance(req.session, FakeSession):
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\api.py", line 216, in getattr
value = self.callbacks[name](self)
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\main.py", line 300, in _get_session
return Session(self.env, req)
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\session.py", line 192, in init
if req.authname == 'anonymous':
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\api.py", line 216, in getattr
value = self.callbacks[name](self)
File "c:\docume~1\ccs~2.gis\locals~1\temp\easy_install-riokcd\Trac-0.12.2-py2.5-win32.egg.tmp\trac\web\main.py", line 159, in authenticate
authname = authenticator.authenticate(req)
File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 490, in wrap
return func(self, *args, kwds)
File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 500, in authenticate
user = self._remote_user(req)
File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 706, in _remote_user
if acctmgr.check_password(user, password) == True:
File "build\bdist.win32\egg\acct_mgr\api.py", line 284, in check_password
valid = store.check_password(user, password)
File "build\bdist.win32\egg\tracext\adauth\auth.py", line 86, in check_password
dn = self._get_user_dn(user)
File "build\bdist.win32\egg\tracext\adauth\auth.py", line 144, in _get_user_dn
if self.has_user(user):
File "build\bdist.win32\egg\tracext\adauth\auth.py", line 81, in has_user
users = self.get_users()
File "build\bdist.win32\egg\tracext\adauth\auth.py", line 50, in get_users
userinfo = [self._get_userinfo(u[1]) for u in users]
File "build\bdist.win32\egg\tracext\adauth\auth.py", line 165, in _get_userinfo
for e in attrsproxyAddress?:
KeyError: 'proxyAddress'