Commit 3b04528b authored by Andreas Jung's avatar Andreas Jung

- Collector #2346: username logging in FCGI crashed the server

parent b8c8cb53
...@@ -8,6 +8,8 @@ Zope Changes ...@@ -8,6 +8,8 @@ Zope Changes
Bugs fixed Bugs fixed
- Collector #2346: username logging in FCGI crashed the server
- ZopePageTemplate's pt_edit did not recognize content type arguments - ZopePageTemplate's pt_edit did not recognize content type arguments
which had a charset information included. which had a charset information included.
......
...@@ -456,18 +456,15 @@ class FCGIChannel(asynchat.async_chat): ...@@ -456,18 +456,15 @@ class FCGIChannel(asynchat.async_chat):
method=self.env['REQUEST_METHOD'] method=self.env['REQUEST_METHOD']
else: else:
method="GET" method="GET"
user_name = '-'
if self.env.has_key('HTTP_AUTHORIZATION'): if self.env.has_key('HTTP_AUTHORIZATION'):
http_authorization=self.env['HTTP_AUTHORIZATION'] http_authorization=self.env['HTTP_AUTHORIZATION']
if string.lower(http_authorization[:6]) == 'basic ': if string.lower(http_authorization[:6]) == 'basic ':
try: decoded=base64.decodestring(http_authorization[6:]) try: decoded=base64.decodestring(http_authorization[6:])
except base64.binascii.Error: decoded='' except base64.binascii.Error: decoded=''
t = string.split(decoded, ':', 1) t = string.split(decoded, ':', 1)
if len(t) < 2: if len(t) >= 2:
user_name = '-'
else:
user_name = t[0] user_name = t[0]
else:
user_name='-'
if self.addr: if self.addr:
self.server.logger.log ( self.server.logger.log (
self.addr[0], self.addr[0],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment