mirror of
https://github.com/django/django.git
synced 2025-07-05 10:19:20 +00:00
magic-removal: Added a fix to allow UserWrapper and request objects to be unpickled without infinite recursion loops.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4ddf1b3dc7
commit
bcacb8843e
@ -15,6 +15,8 @@ class UserWrapper(object):
|
|||||||
_user = property(_get_user)
|
_user = property(_get_user)
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
|
if name == '__setstate__': # slight hack to allow object to be unpickled
|
||||||
|
return None
|
||||||
return getattr(self._user, name)
|
return getattr(self._user, name)
|
||||||
|
|
||||||
class AuthenticationMiddleware:
|
class AuthenticationMiddleware:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user