(fix) change 403 to 409 so Lightning doesn't fail silently

pull/27/merge
Ludovic Marcotte 2016-08-04 14:13:00 -04:00
parent f03cdaf4b7
commit 21e0cd8711
2 changed files with 10 additions and 9 deletions

1
NEWS
View File

@ -25,6 +25,7 @@ Bug fixes
- [web] added support for multiple description values in LDAP entries (#3750)
- [eas] fixed long GUID issue preventing sometimes synchronisation (#3460)
- [core] fixing sogo-tool backup with multi-domain configuration but domain-less logins
- [core] during event scheduling, use 409 instead of 403 so Lightning doesn't fail silently
3.1.4 (2016-07-12)
------------------

View File

@ -555,7 +555,7 @@
[user cn], @"Cn",
[user systemEmail], @"SystemEmail", nil];
reason = [values keysWithFormat: [self labelForKey: @"Cannot access resource: \"%{Cn} %{SystemEmail}\""]];
return [NSException exceptionWithHTTPStatus:403 reason: reason];
return [NSException exceptionWithHTTPStatus:409 reason: reason];
}
fbInfo = [NSMutableArray arrayWithArray: [folder fetchFreeBusyInfosFrom: start
@ -671,7 +671,7 @@
info = [NSDictionary dictionaryWithObject: reason forKey: @"reject"];
return [NSException exceptionWithHTTPStatus: 403
return [NSException exceptionWithHTTPStatus: 409
reason: [info jsonRepresentation]];
}
}
@ -706,7 +706,7 @@
[info setObject: conflicts forKey: @"conflicts"];
return [NSException exceptionWithHTTPStatus: 403
return [NSException exceptionWithHTTPStatus: 409
reason: [info jsonRepresentation]];
}
} // if ([fbInfo count]) ...
@ -1506,14 +1506,14 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
if (delegatedUid)
delegatedUser = [SOGoUser userWithLogin: delegatedUid];
if (delegatedUser != nil && [event userIsOrganizer: delegatedUser])
ex = [NSException exceptionWithHTTPStatus: 403
ex = [NSException exceptionWithHTTPStatus: 409
reason: @"delegate is organizer"];
if ([event isAttendee: [[delegate email] rfc822Email]])
ex = [NSException exceptionWithHTTPStatus: 403
ex = [NSException exceptionWithHTTPStatus: 409
reason: @"delegate is a participant"];
else if ([SOGoGroup groupWithEmail: [[delegate email] rfc822Email]
inDomain: [ownerUser domain]])
ex = [NSException exceptionWithHTTPStatus: 403
ex = [NSException exceptionWithHTTPStatus: 409
reason: @"delegate is a group"];
}
if (ex == nil)
@ -1999,7 +1999,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
// TODO: send out a no-uid-conflict (DAV:href) xml element (rfc4791 section 5.3.2.1)
if ([container resourceNameForEventUID: eventUID])
{
return [NSException exceptionWithHTTPStatus: 403
return [NSException exceptionWithHTTPStatus: 409
reason: [NSString stringWithFormat: @"Event UID already in use. (%@)", eventUID]];
}
@ -2207,9 +2207,9 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
}
// We first check of the sequences are alright. We don't accept attendees
// accepting "old" invitations. If that's the case, we return a 403
// accepting "old" invitations. If that's the case, we return a 409
if ([[newEvent sequence] intValue] < [[oldEvent sequence] intValue])
return [NSException exceptionWithHTTPStatus: 403
return [NSException exceptionWithHTTPStatus: 409
reason: @"sequences don't match"];
// Remove the RSVP attribute, as an action from the attendee