[CalendarServer-changes] [7575] CalendarServer/trunk/twistedcaldav/ical.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jun 7 18:07:37 PDT 2011
Revision: 7575
http://trac.macosforge.org/projects/calendarserver/changeset/7575
Author: cdaboo at apple.com
Date: 2011-06-07 18:07:36 -0700 (Tue, 07 Jun 2011)
Log Message:
-----------
Prevent invalid DTEND & DURATION from being stored.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/ical.py
Modified: CalendarServer/trunk/twistedcaldav/ical.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/ical.py 2011-06-08 01:05:52 UTC (rev 7574)
+++ CalendarServer/trunk/twistedcaldav/ical.py 2011-06-08 01:07:36 UTC (rev 7575)
@@ -1389,6 +1389,16 @@
else:
raise InvalidICalendarDataError(msg)
+ # Check for VEVENT - DTEND and DURATION cannot appear together
+ if (subcomponent.name() == "VEVENT" and
+ subcomponent.hasProperty("DTEND") and
+ subcomponent.hasProperty("DURATION")):
+ if fix:
+ # Remove the DTEND
+ subcomponent.removeProperty("DTEND")
+ else:
+ raise InvalidICalendarDataError(msg)
+
timezone_refs.update(subcomponent.timezoneIDs())
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110607/002be29a/attachment.html>
More information about the calendarserver-changes
mailing list