From ea940e645e473419567afbb13c6a2007ff56d78c 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 815c9ea5d..014fe2208 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -27,6 +27,7 @@ #import #import +#import #import #import #import @@ -418,8 +419,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;