summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meetingtools/apps/auth/utils.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/meetingtools/apps/auth/utils.py b/meetingtools/apps/auth/utils.py
index c792b4a..ab22340 100644
--- a/meetingtools/apps/auth/utils.py
+++ b/meetingtools/apps/auth/utils.py
@@ -27,8 +27,11 @@ def groups(request):
def report_auth(request):
auth_data = request.META.get('HTTP_X_REPORT_AUTH', None)
if auth_data and ':' in auth_data:
- report_users = getattr(django_settings, 'REPORT_USERS')
- requester, key = auth_data.split(':')
- if report_users[requester]['key'] == key:
- return report_users[requester]
+ try:
+ report_users = getattr(django_settings, 'REPORT_USERS')
+ requester, key = auth_data.split(':')
+ if report_users[requester]['key'] == key:
+ return report_users[requester]
+ except (AttributeError, KeyError):
+ pass
return False \ No newline at end of file