'NoneType' object is unsubscriptable on login.html
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KARL3 |
Fix Released
|
Medium
|
Chris Rossi |
Bug Description
From the error monitor:
TypeError: 'NoneType' object is unsubscriptable
Exception when processing https:/
Referer: https:/
Traceback (most recent call last):
File "/srv/osfkarl/
response = handler(request)
File "/srv/osfkarl/
return response
File "/srv/osfkarl/
return self._retry_
File "/srv/osfkarl/
reraise(t, v, tb) # otherwise reraise the exception
File "/srv/osfkarl/
response = handler(request)
File "/srv/osfkarl/
response = view_callable(
File "/srv/osfkarl/
result = view(context, request)
File "/srv/osfkarl/
userid = authenticate(users, login, password)
File "/srv/osfkarl/
if user and 'group.KarlAdmin' in admin['groups']:
TypeError: 'NoneType' object is unsubscriptable
Changed in karl3: | |
importance: | Undecided → Medium |
tags: | added: tested |
tags: | added: r3.101 |
Changed in karl3: | |
status: | Fix Committed → Fix Released |
The issue is that a user might have a ':' in their password, which was confusing the impersonate plugin which looks for a ':' in the password field and assumes the password is in the form of 'admin_ user:admin_ password' . In this case, the value to the left of the colon wasn't an actual user in the system, which caused the exception above. I've fixed the code to fall through to normal login rather than raising an exception if impersonation fails in this way.
Fixed on 'crossi- 1080760- fix-impersonate '
To test, enter an arbitrary password with a colon in it at the login page. Notice that you don't get a general error.