Skip to content

Commit

Permalink
Merge to 2.0.6
Browse files Browse the repository at this point in the history
Conflicts:
	Documentation/SOGo Installation Guide.odt
  • Loading branch information
extrafu committed Jun 21, 2013
2 parents f049e24 + a6b393c commit a79a9c4
Show file tree
Hide file tree
Showing 124 changed files with 2,297 additions and 879 deletions.
540 changes: 540 additions & 0 deletions ChangeLog

Large diffs are not rendered by default.

Binary file modified Documentation/SOGo Installation Guide.odt
Binary file not shown.
Binary file modified Documentation/SOGo Mobile Devices Configuration.odt
Binary file not shown.
Binary file modified Documentation/SOGo Mozilla Thunderbird Configuration.odt
Binary file not shown.
Binary file modified Documentation/SOGo Native Microsoft Outlook Configuration.odt
Binary file not shown.
26 changes: 26 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
2.0.6 (2013-06-21)
------------------

Enhancements
- updated CKEditor to version 4.1.1 (#2333)
- new failed login attemps rate-limiting options. See the new
SOGoMaximumFailedLoginCount, SOGoMaximumFailedLoginInterval and
SOGoFailedLoginBlockInterval defaults
- new message submissions rate-limiting options. See the new
SOGoMaximumMessageSubmissionCount, SOGoMaximumRecipientCount,
SOGoMaximumSubmissionInterval and SOGoMessageSubmissionBlockInterval defaults
- now possible to send or not event notifications on a per-event basis
- now possible to see who created an event/task in a delegated calendar
- multi-domain support in OpenChange (implemented using a trick)

Bug fixes
- fixed decoding of the charset parameter when using single quotes (#2306)
- fixed potential crash when sending MDN from Sent folder (#2209)
- fixed handling of unicode separators (#2309)
- fixed public access when SOGoTrustProxyAuthentication is used (#2237)
- fixed access right issues with import feature (#2294)
- fixed IMAP ACL issue when SOGoForceExternalLoginWithEmail is used (#2313)
- fixed handling of CAS logoutRequest (#2346)
- fixed many major OpenChange stability issues

2.0.5a (2013-04-17)
------------------

Bug fixes
- Fixed an issue when parsing user CN with leading or trailing spaces (#2287)
Expand Down
2 changes: 1 addition & 1 deletion OpenChange/MAPIStoreGCSFolder.m
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ - (BOOL) synchroniseCache
[mapping setObject: cLastModified forKey: changeNumber];
[messageEntry setObject: changeNumber forKey: @"version"];

newChangeNum = [changeNumber unsignedLongValue];
newChangeNum = [changeNumber unsignedLongLongValue];
changeKey = [self getReplicaKeyFromGlobCnt: newChangeNum >> 16];
[self _setChangeKey: changeKey forMessageEntry: messageEntry
inChangeListOnly: NO];
Expand Down
10 changes: 9 additions & 1 deletion OpenChange/MAPIStoreMailMessage.m
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,15 @@ - (int) _getCNFromEmail: (NSString *) fullMail
ngAddress = [[NGMailAddressParser mailAddressParserWithString: fullMail]
parse];
if ([ngAddress isKindOfClass: [NGMailAddress class]])
cn = [ngAddress displayName];
{
cn = [ngAddress displayName];

// If we don't have a displayName, we use the email address instead. This
// avoid bug #2119 - where Outlook won't display anything in the "From" field,
// nor in the recipient field if we reply to the email.
if (![cn length])
cn = [ngAddress address];
}
else
cn = @"";

Expand Down
4 changes: 4 additions & 0 deletions OpenChange/RTFHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,10 @@ - (NSMutableData *) parse
[_html appendBytes: v length: strlen(v)];
free(v);
}
else if ([s hasPrefix: @"fcs"])
{
// ignore
}
else if ([s hasPrefix: @"fs"])
{
// ignore
Expand Down
49 changes: 35 additions & 14 deletions SOPE/NGCards/NSString+NGCards.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,41 @@ - (NSArray *) asCardAttributeValues

- (NSString *) escapedForCards
{
NSString *string;

string = [self stringByReplacingString: @"\\"
withString: @"\\\\"];
string = [string stringByReplacingString: @","
withString: @"\\,"];
// string = [string stringByReplacingString: @":"
// withString: @"\\:"];
string = [string stringByReplacingString: @";"
withString: @"\\;"];
string = [string stringByReplacingString: @"\n"
withString: @"\\n"];
string = [string stringByReplacingString: @"\r"
withString: @"\\r"];
NSMutableString *string;
unsigned int len, i;
unichar c;

len = [self length];
string = [NSMutableString stringWithCapacity: len * 1.5];

for (i = 0; i < len; i++)
{
c = [self characterAtIndex: i];

switch (c)
{
case '\\':
[string appendString: @"\\\\"];
break;
case ',':
[string appendString: @"\\,"];
break;
//case ':':
// [string appendString: @"\\:"];
//break;
case ';':
[string appendString: @"\\;"];
break;
case'\n':
[string appendString: @"\\n"];
break;
case'\r':
[string appendString: @"\\r"];
break;
default:
[string appendFormat: @"%C", c];
}
}

return string;
}
Expand Down
27 changes: 22 additions & 5 deletions Scripts/openchange_cleanup.py → Scripts/openchange_user_cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,16 @@ def main():
except Exception as e:
print "Error during sqlCleanup, continuing: %s" % str(e)

def getsep(client):
seq = None
(code, data) = client.list("", "")
if code == "OK" and data is not None:
# yes this is ugly but it works on cyrus and dovecot.
# (\\Noinferiors \\HasNoChildren) "/" INBOX
m = re.search(".*\s+[\"\']?(.)[\"\']?\s+[\"\']?.*[\"\']?$", data[0])
sep = m.group(1)
return sep

def extractmb(si):
inparen = False
inquote = False
Expand Down Expand Up @@ -120,13 +130,13 @@ def extractmb(si):

return parts[-1]

def cleanupmb(mb, client):
(code, data) = client.list("%s/" % mb, "%")
def cleanupmb(mb, sep, client):
(code, data) = client.list("%s%s" % (mb, sep), "%")
if code == "OK":
for si in data:
if si is not None:
submb = extractmb(si)
cleanupmb(submb, client)
cleanupmb(submb, sep, client)
else:
raise Exception, "Failure while cleaning up '%s'" % mb
client.unsubscribe(mb)
Expand All @@ -145,13 +155,20 @@ def imapCleanup(imaphost, imapport, username, userpass):

print "Logged in as '%s'" % username

for foldername in ("Sync Issues", "Junk E-mail"):
sep = getsep(client)
if not sep:
client.logout()
return

for foldername in ("Sync Issues", "Junk E-mail",
"INBOX%sSync Issues" % sep, "INBOX%sJunk E-mail" % sep,
"Probl&AOg-mes de synchronisation"):
(code, data) = client.list(foldername, "%")
if code == "OK":
for si in data:
if si is not None:
mb = extractmb(si)
cleanupmb(mb, client)
cleanupmb(mb, sep, client)
client.logout()

def mapistoreCleanup(mapistorefolder, username):
Expand Down
3 changes: 2 additions & 1 deletion Scripts/sogo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
// {
// type = ldap;
// CNFieldName = cn;
// IDFieldName = uid;
// UIDFieldName = uid;
// IDFieldName = uid; // first field of the DN for direct binds
// bindFields = (uid, mail); // array of fields to use for indirect binds
// baseDN = "ou=users,dc=acme,dc=com";
// bindDN = "uid=sogo,ou=users,dc=acme,dc=com";
// bindPassword = qwerty;
Expand Down
1 change: 1 addition & 0 deletions Scripts/tmpwatch
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

# SOGOSPOOL must match the value of the configuration parameter SOGoMailSpoolPath
SOGOSPOOL=/var/spool/sogo

/usr/sbin/tmpwatch 24 "$SOGOSPOOL"
Expand Down
3 changes: 0 additions & 3 deletions SoObjects/Appointments/SOGoAppointmentFolder.m
Original file line number Diff line number Diff line change
Expand Up @@ -2901,9 +2901,6 @@ - (NSString *) importComponent: (iCalEntityObject *) event
NSMutableString *content;
NSString *uid;

uid = [self globallyUniqueObjectId];
[event setUid: uid];

// We first look if there's an event with the same UID in our calendar. If not,
// let's reuse what is in the event, otherwise generate a new GUID and use it.
uid = [event uid];
Expand Down
4 changes: 4 additions & 0 deletions SoObjects/Appointments/SOGoCalendarComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,10 @@ - (void) sendEMailUsingTemplateNamed: (NSString *) newPageName
SOGoUser *ownerUser;
SOGoDomainDefaults *dd;

// If defined, we return immediately. When not defined, we send the notifications correctly
if ([object firstChildWithTag: @"X-SOGo-Send-Appointment-Notifications"])
return;

ownerUser = [SOGoUser userWithLogin: owner];
dd = [ownerUser domainDefaults];
if ([dd appointmentSendEMailNotifications] && [object isStillRelevant])
Expand Down
6 changes: 3 additions & 3 deletions SoObjects/Appointments/iCalEntityObject+SOGo.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/* iCalEntityObject+SOGo.h - this file is part of SOGo
*
* Copyright (C) 2007 Inverse inc.
*
* Author: Wolfgang Sourdeau <[email protected]>
* Copyright (C) 2007-2013 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -48,6 +46,8 @@ extern NSNumber *iCalDistantFutureNumber;
- (NSMutableDictionary *) quickRecord;

- (int) priorityNumber;
- (NSString *) createdBy;

- (NSNumber *) quickRecordDateAsNumber: (NSCalendarDate *) _date
withOffset: (int) offset
forAllDay: (BOOL) allDay;
Expand Down
15 changes: 15 additions & 0 deletions SoObjects/Appointments/iCalEntityObject+SOGo.m
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,19 @@ - (int) priorityNumber
return priorityNumber;
}

- (NSString *) createdBy
{
NSString *created_by;

created_by = [[self firstChildWithTag: @"X-SOGo-Component-Created-By"] flattenedValuesForKey: @""];

// We consider "SENT-BY" in case our custom header isn't found
if (![created_by length])
{
created_by = [[self organizer] sentBy];
}

return created_by;
}

@end
12 changes: 8 additions & 4 deletions SoObjects/Mailer/SOGoMailFolder.m
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/*
Copyright (C) 2009-2011 Inverse inc.
Copyright (C) 2009-2013 Inverse inc.
Copyright (C) 2004-2005 SKYRIX Software AG

This file is part of OpenGroupware.org.
This file is part of SOGo.

OGo is free software; you can redistribute it and/or modify it under
SOGo is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.

OGo is distributed in the hope that it will be useful, but WITHOUT ANY
SOGo is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
License for more details.
Expand Down Expand Up @@ -1177,6 +1177,10 @@ - (NSString *) _sogoACLUIDToIMAPUID: (NSString *) uid
if ([uid hasPrefix: @"@"])
return [[[[context activeUser] domainDefaults] imapAclGroupIdPrefix]
stringByAppendingString: [uid substringFromIndex: 1]];
else if ([[[context activeUser] domainDefaults] forceExternalLoginWithEmail])
{
return [[[context activeUser] primaryIdentity] objectForKey: @"email"];
}
else
return uid;
}
Expand Down
3 changes: 2 additions & 1 deletion SoObjects/SOGo/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ SOGo_OBJC_FILES = \

SOGo_RESOURCE_FILES = \
SOGoDefaults.plist \
DAVReportMap.plist
DAVReportMap.plist \
CASLogoutRequestMap.plist

ifeq ($(saml2_config), yes)
SOGo_HEADER_FILES += SOGoSAML2Session.h SOGoSAML2Exceptions.h
Expand Down
11 changes: 1 addition & 10 deletions SoObjects/SOGo/NSCalendarDate+SOGo.m
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,10 @@ - (NSString *) rfc822DateString
timeZoneShift];
}

/* <<<<<<< variant A
#define secondsOfDistantFuture 1073741823.0
#define secondsOfDistantPast -1518491648.0
>>>>>>> variant B */

#define secondsOfDistantFuture 1073741823.0
#define secondsOfDistantPast -1073741823.0

/*
####### Ancestor
#define secondsOfDistantFuture 63113990400.0
#define secondsOfDistantPast -63113817600.0
======= end */

+ (id) distantFuture
{
static NSCalendarDate *date = nil;
Expand Down
23 changes: 13 additions & 10 deletions SoObjects/SOGo/NSString+Utilities.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* NSString+Utilities.m - this file is part of SOGo
*
* Copyright (C) 2006-2011 Inverse inc.
* Copyright (C) 2006-2013 Inverse inc.
*
* Author: Wolfgang Sourdeau <[email protected]>
* Ludovic Marcotte <[email protected]>
Expand Down Expand Up @@ -279,32 +279,35 @@ - (NSString *) doubleQuotedString

- (NSString *) jsonRepresentation
{
static char thisCharCode[28];
static unichar thisCharCode[29];
static NSString *controlCharString = nil;
static NSCharacterSet *controlCharSet = nil;
NSString *cleanedString;
int i;
int i, j;

if (!controlCharSet)
{
// Create an array of chars for all control characters between 0x00 and 0x1F,
// apart from \t, \n, \f and \r (0x08, 0x09, 0x0A, 0x0C and 0x0D)
for (i = 0x00; i <= 0x08; i++) {
thisCharCode[i] = i;
for (i = 0, j = 0x00; j < 0x08; i++, j++) {
thisCharCode[i] = j;
}
thisCharCode[9] = 0x0B;
for (i = 0x0E; i <= 0x1F; i++) {
thisCharCode[i - 4] = i;
thisCharCode[i++] = 0x0B;
for (j = 0x0E; j <= 0x1F; i++, j++) {
thisCharCode[i] = j;
}
controlCharString = [NSString stringWithCString: thisCharCode length: 28];

// Also add some unicode separators
thisCharCode[i++] = 0x2028; // line separator
thisCharCode[i++] = 0x2029; // paragraph separator
controlCharString = [NSString stringWithCharacters:thisCharCode length:i];
controlCharSet = [NSCharacterSet characterSetWithCharactersInString: controlCharString];
[controlCharSet retain];
}

// Escape double quotes and remove control characters
cleanedString = [[[self doubleQuotedString] componentsSeparatedByCharactersInSet: controlCharSet]
componentsJoinedByString: @""];

return cleanedString;
}

Expand Down
11 changes: 11 additions & 0 deletions SoObjects/SOGo/SOGoCASSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
+ (SOGoCASSession *) CASSessionWithIdentifier: (NSString *) newIdentifier
fromProxy: (BOOL) fromProxy;

+ (void) handleLogoutRequest: (NSString *) logoutRequest;

- (NSString *) identifier;

- (NSString *) ticket;
Expand All @@ -65,4 +67,13 @@

@end

@interface CASLogoutRequest : NSObject
{
NSString *sessionIndex;
}

- (NSString *) sessionIndex;

@end

#endif /* SOGOCASSESSION_H */
Loading

0 comments on commit a79a9c4

Please sign in to comment.