From adc227a7eb481126add74c8e0c255067e9f379a8 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 11 Apr 2016 14:53:17 -0400 Subject: [PATCH] (fix) avoid broken redirects on sessions expiration --- UI/Common/UIxPageFrame.m | 6 +++++- UI/SOGoUI/UIxComponent.m | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/UI/Common/UIxPageFrame.m b/UI/Common/UIxPageFrame.m index 1754b10b0..e7506182f 100644 --- a/UI/Common/UIxPageFrame.m +++ b/UI/Common/UIxPageFrame.m @@ -466,8 +466,12 @@ - (NSString *) userIdentification { + NSString *v; + /* The "identification" term is used in the human sense here. */ - return [[context activeUser] cn]; + v = [[context activeUser] cn]; + + return (v ? v : @""); } - (NSString *) userEmail diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 0ab260b8f..c4606f13f 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -364,6 +364,9 @@ static SoProduct *commonProduct = nil; baseURL = [[self clientObject] baseURLInContext: context]; + if (!baseURL) + baseURL = @"/SOGo/so/"; + if ([baseURL hasSuffix: [NSString stringWithFormat: @"%@/", [[self parent] modulePath]]]) return baseURL;