From 3d7071d018c4047a98da37c700eaeeeacd028168 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 15 Dec 2016 14:22:07 -0500 Subject: [PATCH] (fix) return login page for unknown users (fixes #2135) --- Main/SOGo.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Main/SOGo.m b/Main/SOGo.m index cd77c8c04..f129c26fb 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -35,6 +35,7 @@ #import #import +#import #import #import #import @@ -369,8 +370,12 @@ static BOOL debugLeaks; "GET" if no method was provided in the query path. */ if ([_key length] > 0 && ![_key isEqualToString:@"favicon.ico"]) - obj = [self lookupUser: _key inContext: _ctx]; - } + { + obj = [self lookupUser: _key inContext: _ctx]; + if (!obj) + obj = [self lookupUser: @"anonymous" inContext: _ctx]; + } + } } else obj = nil;