diff --git a/Apache/SOGo.conf b/Apache/SOGo.conf index 853b5ae0e..e065c3240 100644 --- a/Apache/SOGo.conf +++ b/Apache/SOGo.conf @@ -66,3 +66,9 @@ ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0 Allow from all +# For apple autoconfiguration + + RewriteEngine On + RewriteRule ^/.well-known/caldav/?$ /SOGo/dav [R=301] + + diff --git a/NEWS b/NEWS index 550acb8cb..aa6aa5119 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ Bug fixes - fixed position of red line of current time - disabled verbose logging of smtp sessions by default - fixed high CPU usage when there are no available child processes + - fixed crash in dav f/b lookups when using SQL addressbooks (#2418) + - fixed memory consumption issues when doing dav lookups with huge result set 2.0.7 (2013-07-19) ------------------ diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index 13622ae4f..18f08e10b 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -294,7 +294,9 @@ contact = [contacts lastObject]; email = [contact valueForKey: @"c_email"]; source = [contact objectForKey: @"source"]; - if ([email length] && [source MSExchangeHostname]) + if ([email length] + && [source conformsToProtocol: @protocol (SOGoDNSource)] + && [source MSExchangeHostname]) { exchangeFreeBusy = [[MSExchangeFreeBusy alloc] init]; [exchangeFreeBusy autorelease]; diff --git a/SoObjects/Contacts/SOGoFolder+CardDAV.m b/SoObjects/Contacts/SOGoFolder+CardDAV.m index 3466e940e..2644e228f 100644 --- a/SoObjects/Contacts/SOGoFolder+CardDAV.m +++ b/SoObjects/Contacts/SOGoFolder+CardDAV.m @@ -21,6 +21,7 @@ */ #import +#import #import #import @@ -65,7 +66,7 @@ @""]; [r appendContentString: baseURL]; if (![baseURL hasSuffix: @"/"]) - [r appendContentString: @"/"]; + [r appendContentString: @"/"]; [r appendContentString: name]; [r appendContentString: @"" @"" @@ -89,9 +90,10 @@ - (void) _appendComponentsMatchingFilters: (NSArray *) filters toResponse: (WOResponse *) response - context: (id) localContext + context: (id) localContext { - unsigned int count, max; + unsigned int count,i , max; + NSAutoreleasePool *pool; NSDictionary *currentFilter, *contact; NSEnumerator *contacts; NSString *baseURL, *domain; @@ -103,16 +105,27 @@ for (count = 0; count < max; count++) { currentFilter = [filters objectAtIndex: count]; - contacts = [[(id)self lookupContactsWithFilter: [[currentFilter allValues] lastObject] - onCriteria: @"name_or_address" - sortBy: @"c_givenname" - ordering: NSOrderedDescending - inDomain: domain] - objectEnumerator]; - + contacts = + [[(id)self lookupContactsWithFilter: [[currentFilter allValues] lastObject] + onCriteria: @"name_or_address" + sortBy: @"c_givenname" + ordering: NSOrderedDescending + inDomain: domain] objectEnumerator]; + + pool = [[NSAutoreleasePool alloc] init]; + i = 0; while ((contact = [contacts nextObject])) - [self _appendObject: contact withBaseURL: baseURL - toREPORTResponse: response]; + { + [self _appendObject: contact withBaseURL: baseURL + toREPORTResponse: response]; + if (i % 10 == 0) + { + RELEASE(pool); + pool = [[NSAutoreleasePool alloc] init]; + } + i++; + } + RELEASE(pool); } } @@ -123,10 +136,10 @@ newString = [theString lowercaseString]; return ([newString isEqualToString: @"sn"] - || [newString isEqualToString: @"givenname"] - || [newString isEqualToString: @"email"] - || [newString isEqualToString: @"mail"] - || [newString isEqualToString: @"telephonenumber"]); + || [newString isEqualToString: @"givenname"] + || [newString isEqualToString: @"email"] + || [newString isEqualToString: @"mail"] + || [newString isEqualToString: @"telephonenumber"]); } - (NSDictionary *) _parseContactFilter: (id ) filterElement @@ -145,12 +158,12 @@ ranges = [filterElement getElementsByTagName: @"text-match"]; if ([(NSArray *) ranges count] - && [(NSArray *) [[ranges objectAtIndex: 0] childNodes] count]) - { - filterData = [NSMutableDictionary dictionary]; - [filterData setObject: [(NGDOMNode *)[ranges objectAtIndex: 0] textValue] - forKey: [filterElement attribute: @"name"]]; - } + && [(NSArray *) [[ranges objectAtIndex: 0] childNodes] count]) + { + filterData = [NSMutableDictionary dictionary]; + [filterData setObject: [(NGDOMNode *)[ranges objectAtIndex: 0] textValue] + forKey: [filterElement attribute: @"name"]]; + } } return filterData; @@ -166,7 +179,7 @@ filters = [NSMutableArray array]; children = [(NSArray *)[parentNode getElementsByTagName: @"prop-filter"] - objectEnumerator]; + objectEnumerator]; while ((node = [children nextObject])) { filter = [self _parseContactFilter: node]; @@ -193,7 +206,7 @@ [self _appendComponentsMatchingFilters: filters toResponse: r - context: queryContext]; + context: queryContext]; [r appendContentString: @""]; return r; diff --git a/UI/Templates/MailerUI/UIxMailPopupView.wox b/UI/Templates/MailerUI/UIxMailPopupView.wox index 1b77d6622..1ae438566 100644 --- a/UI/Templates/MailerUI/UIxMailPopupView.wox +++ b/UI/Templates/MailerUI/UIxMailPopupView.wox @@ -7,6 +7,7 @@ className="UIxPageFrame" title="title" const:jsFiles="SOGoAutoCompletion.js" + const:userDefaultsKeys="SOGoMailDisplayRemoteInlineImages" const:popup="YES">