collective/collective.usernamelogger — pull request #1 by lukasgraf (2012-11-05 08:29:56+00:00)
Title: Deal with doubly quoted __ac cookies

When collective.usernamelogger encounters an __ac cookie that has been quoted twice with ``urllib.quote``, it currently can't correctly base64 decode it, because the base64 padding is messed up unless the cookie is unquoted twice.

This will raise a ``binascii.Error: Incorrect padding``, leading to an uncaptured Python exception because c.usernamelogger monkey patches the ``http_request`` method of the Medusa ZServer. This will cause that thread to stall indefinitely.

After preparing my patch I noticed that @kroman0 already took care of the uncaptured Python exception in commit c04ceaaa9e. So this patch just adds the functionality to actually extract the username from such cookies.