Commit 99520b14 authored by Jim Fulton's avatar Jim Fulton

Fixed bug in handling missing Authentication data.

parent a50bc207
"""Access control package""" """Access control package"""
__version__='$Revision: 1.31 $'[11:-2] __version__='$Revision: 1.32 $'[11:-2]
from PersistentMapping import PersistentMapping from PersistentMapping import PersistentMapping
...@@ -88,7 +88,9 @@ class UserFolder(Implicit, Persistent, Navigation, Tabs, Item, ...@@ -88,7 +88,9 @@ class UserFolder(Implicit, Persistent, Navigation, Tabs, Item,
def validate(self,request,auth='',roles=None): def validate(self,request,auth='',roles=None):
if not auth: if not auth:
if roles is None:
return nobody return nobody
return None
if lower(auth[:6])!='basic ': if lower(auth[:6])!='basic ':
return None return None
name,password=tuple(split(decodestring(split(auth)[-1]), ':')) name,password=tuple(split(decodestring(split(auth)[-1]), ':'))
......
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