[Zope-dev] Problems with LoginManager form-based login
Phillip J. Eby
pje@telecommunity.com
Fri, 26 May 2000 14:10:14 -0500
At 03:05 PM 5/26/00 -0400, Evan Simpson wrote:
>----- Original Message -----
>From: Phillip J. Eby <pje@telecommunity.com>
>> Been there, done that. Yours doesn't work either, btw. Well, actually,
>it
>> does, it's just that it causes a memory leak because it leaves an
>> unintended circular reference. We've got a version that fixes the
>circular
>> reference, but in a really really ugly way (it does a run-time patch to
>> BaseRequest.close() to remove the poked-in unauthorized() method).
>
>The GUF version, at least, doesn't need this drastic a fix. Adding the
>following line to the top of guf_unauthorized should suffice:
>
>del request.RESPONSE.unauthorized
>
You're making the assumption that unauthorized gets called. If it doesn't
get called (because the current user *does* exist in a higher-level
folder), then the hook will never get released.