mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
(fix) avoid saving non-parsable events/tasks
This commit is contained in:
@@ -2503,6 +2503,14 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent
|
||||
|
||||
rq = [_ctx request];
|
||||
rqCalendar = [iCalCalendar parseSingleFromSource: [rq contentAsString]];
|
||||
|
||||
// We are unable to parse the received calendar, we return right away
|
||||
// with a 400 error code.
|
||||
if (!rqCalendar)
|
||||
{
|
||||
return [NSException exceptionWithHTTPStatus: 400
|
||||
reason: @"Unable to parse event."];
|
||||
}
|
||||
|
||||
if (![self isNew])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user