[CalendarServer-changes] [2217] CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/ schedule.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 7 14:37:58 PST 2008


Revision: 2217
          http://trac.macosforge.org/projects/calendarserver/changeset/2217
Author:   wsanchez at apple.com
Date:     2008-03-07 14:37:56 -0800 (Fri, 07 Mar 2008)

Log Message:
-----------
Handle organizerPrincipal is None case

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/schedule.py

Modified: CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/schedule.py
===================================================================
--- CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/schedule.py	2008-03-07 19:54:35 UTC (rev 2216)
+++ CalendarServer/branches/users/wsanchez/guid-calendars/twistedcaldav/schedule.py	2008-03-07 22:37:56 UTC (rev 2217)
@@ -279,9 +279,15 @@
     
         # Verify that the ORGANIZER's cu address maps to the request.uri
         organizer = calendar.getOrganizer()
-        if organizer is not None:
+        if organizer is None:
+            organizerPrincipal = None
+        else:
             organizerPrincipal = self.principalForCalendarUserAddress(organizer)
 
+        if organizerPrincipal is None:
+            logging.err("ORGANIZER in calendar data is not valid: %s" % (calendar,), system="CalDAV Outbox POST")
+            raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "organizer-allowed")))
+
         # Prevent spoofing of ORGANIZER with specific METHODs
         if (
             calendar.propertyValue("METHOD") in ("PUBLISH", "REQUEST", "ADD", "CANCEL", "DECLINECOUNTER") and

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080307/be7302f9/attachment-0001.html 


More information about the calendarserver-changes mailing list