1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +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:
Luke Plant 2006-03-13 22:10:59 +00:00
parent 4ddf1b3dc7
commit bcacb8843e

View File

@ -15,6 +15,8 @@ class UserWrapper(object):
_user = property(_get_user)
def __getattr__(self, name):
if name == '__setstate__': # slight hack to allow object to be unpickled
return None
return getattr(self._user, name)
class AuthenticationMiddleware: