[CalendarServer-changes] [4191] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Tue May 5 17:42:26 PDT 2009


Revision: 4191
          http://trac.macosforge.org/projects/calendarserver/changeset/4191
Author:   sagen at apple.com
Date:     2009-05-05 17:42:26 -0700 (Tue, 05 May 2009)
Log Message:
-----------
When an invalid CUA is passed in as a calendar-user-address-set search term in a principal-property-search report, return 400/Bad Request.

Modified Paths:
--------------
    CalendarServer/trunk/run
    CalendarServer/trunk/twistedcaldav/extensions.py

Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run	2009-05-06 00:41:17 UTC (rev 4190)
+++ CalendarServer/trunk/run	2009-05-06 00:42:26 UTC (rev 4191)
@@ -727,7 +727,7 @@
 
 caldavtester="${top}/CalDAVTester";
 
-svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 4154;
+svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 4190;
 
 #
 # PyFlakes

Modified: CalendarServer/trunk/twistedcaldav/extensions.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/extensions.py	2009-05-06 00:41:17 UTC (rev 4190)
+++ CalendarServer/trunk/twistedcaldav/extensions.py	2009-05-06 00:42:26 UTC (rev 4191)
@@ -407,8 +407,11 @@
         for props, match, caseless, matchType in propertySearches:
             nonDirectoryProps = []
             for prop in props:
-                fieldName, match = principalCollection.propertyToField(
-                    prop, match)
+                try:
+                    fieldName, match = principalCollection.propertyToField(
+                        prop, match)
+                except ValueError, e:
+                    raise HTTPError(StatusResponse(responsecode.BAD_REQUEST, str(e)))
                 if fieldName:
                     fields.append((fieldName, match, caseless, matchType))
                 else:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090505/9c072517/attachment-0001.html>


More information about the calendarserver-changes mailing list