Commit bd624b27 authored by 's avatar

merge from 2.3

parent fdf019dc
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Access control package""" """Access control package"""
__version__='$Revision: 1.137 $'[11:-2] __version__='$Revision: 1.138 $'[11:-2]
import Globals, socket, ts_regex, SpecialUsers import Globals, socket, ts_regex, SpecialUsers
import os import os
...@@ -514,7 +514,10 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager, ...@@ -514,7 +514,10 @@ class BasicUserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
def identify(self, auth): def identify(self, auth):
if auth and lower(auth[:6])=='basic ': if auth and lower(auth[:6])=='basic ':
name, password=tuple(split(decodestring(split(auth)[-1]), ':', 1)) try: name, password=tuple(split(decodestring(
split(auth)[-1]), ':', 1))
except:
raise 'Bad Request', 'Invalid authentication token'
return name, password return name, password
else: else:
return None, None return None, None
......
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