From 9e431d08a273f519ff833b15189d2d3ebef4fc79 Mon Sep 17 00:00:00 2001 From: Hivert Quentin Date: Tue, 1 Apr 2025 16:18:02 +0200 Subject: [PATCH] fix(iOS): iOS 18.4 encodes caldav url and put %40 instead of @ for username. Fix that. --- Main/SOGo.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Main/SOGo.m b/Main/SOGo.m index c36aaa287..9218a53ad 100644 --- a/Main/SOGo.m +++ b/Main/SOGo.m @@ -383,7 +383,12 @@ static BOOL debugLeaks; if([login isEqualToString: @"changeLanguage"]) user = nil; else + { + //Here the user is expected to be name or name@domain.com + //However iOS 18.4 sanitize the caldav url and put %40 instead of @ + login = [login stringByReplacingOccurrencesOfString: @"%40" withString: @"@"]; user = [SOGoUser userWithLogin: login roles: nil]; + } if (user) userFolder = [$(@"SOGoUserFolder") objectWithName: login inContainer: self]; @@ -451,7 +456,7 @@ static BOOL debugLeaks; { obj = [self lookupUser: _key inContext: _ctx]; if (!obj && ![_key isEqualToString: @"public"]) - obj = [self lookupUser: @"anonymous" inContext: _ctx]; + obj = [self lookupUser: @"anonymous" inContext: _ctx]; } } }