oops while logging about ratelimit
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical SSO provider |
Confirmed
|
High
|
Unassigned |
Bug Description
A user reported an OOPS on SSO (2306carambolau
By inspecting the oops report is shows
Traceback (most recent call last):
Module /srv/login.
request.
Module /srv/login.
return self.disallowed
Module /srv/login.
return self.view_
Module /usr/lib/
return bound_func(*args, **kwargs)
Module /usr/lib/
return func(self, *args2, **kwargs2)
Module /srv/login.
response = func(request, *args, **kwargs)
Module /usr/lib/
return bound_func(*args, **kwargs)
Module /usr/lib/
return self.dispatch(
Module /usr/lib/
response = callback(request, *callback_args, **callback_kwargs)
Module /usr/lib/
response = self.get_
AttributeError: ' 'Account' object has no attribute 'username''
which indicates an error in the code handling the logging of a ratelimit-blocked post
def disallowed(self, request):
remote_ip = self.remote_
logger = logging.
logger.warn("%s (%s) exceeded rate limit for %s"
return HttpResponseFor
request.user is an instance of Account due to the
identityprovide
middleware.