(fix) return login page for unknown users (fixes #2135)

pull/14/merge
Ludovic Marcotte 2016-12-15 14:22:07 -05:00
parent 651c0fdf14
commit ea940e645e
1 changed files with 7 additions and 2 deletions

View File

@ -27,6 +27,7 @@
#import <GDLContentStore/GCSAlarmsFolder.h>
#import <GDLContentStore/GCSSessionsFolder.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/SoClassSecurityInfo.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WORequest+So.h>
@ -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;