[CalendarServer-changes] [3447] CalendarServer/branches/users/wsanchez/deployment
source_changes at macosforge.org
source_changes at macosforge.org
Wed Dec 3 11:19:07 PST 2008
Revision: 3447
http://trac.macosforge.org/projects/calendarserver/changeset/3447
Author: wsanchez at apple.com
Date: 2008-12-03 11:19:07 -0800 (Wed, 03 Dec 2008)
Log Message:
-----------
Pull up r3404: Server should disallow multiple overrides of one instance
Modified Paths:
--------------
CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/ical.py
Added Paths:
-----------
CalendarServer/branches/users/wsanchez/deployment/lib-patches/vobject/vobject.icalendar.patch
Copied: CalendarServer/branches/users/wsanchez/deployment/lib-patches/vobject/vobject.icalendar.patch (from rev 3431, CalendarServer/trunk/lib-patches/vobject/vobject.icalendar.patch)
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment/lib-patches/vobject/vobject.icalendar.patch (rev 0)
+++ CalendarServer/branches/users/wsanchez/deployment/lib-patches/vobject/vobject.icalendar.patch 2008-12-03 19:19:07 UTC (rev 3447)
@@ -0,0 +1,17 @@
+Index: vobject/icalendar.py
+===================================================================
+--- vobject/icalendar.py (revision 210)
++++ vobject/icalendar.py (working copy)
+@@ -1660,9 +1660,10 @@
+ else:
+ current = current + char
+ else:
+- state = "read normal"
++ #state = "read normal"
+ # leave unrecognized escaped characters for later passes
+- current = current + '\\' + char
++ #current = current + '\\' + char
++ raise ParseError("error: illegal escape sequence: '\\%s'" % (char,))
+
+ elif state == "end": #an end state
+ if current != "" or len(results) == 0:
Modified: CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/ical.py
===================================================================
--- CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/ical.py 2008-12-03 03:07:37 UTC (rev 3446)
+++ CalendarServer/branches/users/wsanchez/deployment/twistedcaldav/ical.py 2008-12-03 19:19:07 UTC (rev 3447)
@@ -845,11 +845,12 @@
# Must not contain more than one type of iCalendar component, except for
# the required timezone components, and component UIDs must match
#
- ctype = None
- component_id = None
- timezone_refs = set()
- timezones = set()
- got_master = False
+ ctype = None
+ component_id = None
+ component_rids = set()
+ timezone_refs = set()
+ timezones = set()
+ got_master = False
for subcomponent in self.subcomponents():
# Disallowed in CalDAV-Access-08, section 4.1
@@ -881,11 +882,18 @@
"(%s and %s found)" % (component_id, subcomponent.propertyValue("UID")))
elif subcomponent.propertyValue("Recurrence-ID") is None:
if got_master:
- raise ValueError("Calendar resources may not contain components with the same UIDs and no Recurrence-IDs" +
+ raise ValueError("Calendar resources may not contain components with the same UIDs and no Recurrence-IDs " +
"(%s and %s found)" % (component_id, subcomponent.propertyValue("UID")))
else:
got_master = True
+ rid = subcomponent.getRecurrenceIDUTC()
+ if rid in component_rids:
+ raise ValueError("Calendar resources may not contain components with the same Recurrence-IDs " +
+ "(%s)" % (rid,))
+ else:
+ component_rids.add(rid)
+
timezone_refs.update(subcomponent.timezoneIDs())
#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081203/a9b30839/attachment.html>
More information about the calendarserver-changes
mailing list