[CalendarServer-changes] [5729] CalDAVTester/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri Jun 11 14:11:23 PDT 2010


Revision: 5729
          http://trac.macosforge.org/projects/calendarserver/changeset/5729
Author:   cdaboo at apple.com
Date:     2010-06-11 14:11:20 -0700 (Fri, 11 Jun 2010)
Log Message:
-----------
Test reject of per-user data injection.

Modified Paths:
--------------
    CalDAVTester/trunk/scripts/tests/CalDAV/sharing-peruser-data.xml

Added Paths:
-----------
    CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/
    CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/1.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/2.ics
    CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/3.ics

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/1.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/1.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/1.ics	2010-06-11 21:11:20 UTC (rev 5729)
@@ -0,0 +1,41 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:user01-uid
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 1-inject
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:user01-uid
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+BEGIN:VALARM
+ACTION:DISPLAY
+DESCRIPTION:Test
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/2.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/2.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/2.ics	2010-06-11 21:11:20 UTC (rev 5729)
@@ -0,0 +1,34 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:user02-uid
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 2-inject
+BEGIN:VALARM
+ACTION:DISPLAY
+DESCRIPTION:Test
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+END:VEVENT
+END:VCALENDAR

Added: CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/3.ics
===================================================================
--- CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/3.ics	                        (rev 0)
+++ CalDAVTester/trunk/Resource/CalDAV/sharing/peruser-data/inject/3.ics	2010-06-11 21:11:20 UTC (rev 5729)
@@ -0,0 +1,41 @@
+BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//PYVOBJECT//NONSGML Version 1//EN
+BEGIN:VTIMEZONE
+TZID:US/Eastern
+LAST-MODIFIED:20040110T032845Z
+BEGIN:STANDARD
+DTSTART:20001026T020000
+RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
+TZNAME:EST
+TZOFFSETFROM:-0400
+TZOFFSETTO:-0500
+END:STANDARD
+BEGIN:DAYLIGHT
+DTSTART:20000404T020000
+RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=4
+TZNAME:EDT
+TZOFFSETFROM:-0500
+TZOFFSETTO:-0400
+END:DAYLIGHT
+END:VTIMEZONE
+BEGIN:VEVENT
+UID:user02-uid
+DTSTART;TZID=US/Eastern:20060101T180000
+DURATION:PT1H
+DTSTAMP:20051222T210310Z
+SUMMARY:event 2-inject
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:user02-uid
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+BEGIN:VALARM
+ACTION:DISPLAY
+DESCRIPTION:Test
+TRIGGER;RELATED=START:-PT10M
+END:VALARM
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR

Modified: CalDAVTester/trunk/scripts/tests/CalDAV/sharing-peruser-data.xml
===================================================================
--- CalDAVTester/trunk/scripts/tests/CalDAV/sharing-peruser-data.xml	2010-06-11 19:02:14 UTC (rev 5728)
+++ CalDAVTester/trunk/scripts/tests/CalDAV/sharing-peruser-data.xml	2010-06-11 21:11:20 UTC (rev 5729)
@@ -96,7 +96,7 @@
 		</request>
 	</start>
 	
-	<test-suite name='Initial event' ignore='no'>
+	<test-suite name='Initial event' ignore='yes'>
 		<test name='1' ignore='no'>
 			<description>User01 store to shared</description>
 			<request user="$userid1:" pswd="$pswd1:" print-response="no">
@@ -138,7 +138,7 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='User01 changed event' ignore='no'>
+	<test-suite name='User01 changed event' ignore='yes'>
 		<test name='1' ignore='no'>
 			<description>User01 store to shared</description>
 			<request user="$userid1:" pswd="$pswd1:" print-response="no">
@@ -180,7 +180,7 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='User02 changed event' ignore='no'>
+	<test-suite name='User02 changed event' ignore='yes'>
 		<test name='1' ignore='no'>
 			<description>User02 store to shared</description>
 			<request user="$userid2:" pswd="$pswd2:" print-response="no">
@@ -222,7 +222,7 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='Different freebusy' ignore='no'>
+	<test-suite name='Different freebusy' ignore='yes'>
 		<test name='1'>
 			<description>Set properties on new calendars</description>
 			<request print-response='no'>
@@ -393,7 +393,7 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='User01 complex recurring store' ignore='no'>
+	<test-suite name='User01 complex recurring store' ignore='yes'>
 		<test name='1' ignore='no'>
 			<description>User01 store to shared</description>
 			<request user="$userid1:" pswd="$pswd1:" print-response="no">
@@ -435,7 +435,7 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='User02 complex recurring store' ignore='no'>
+	<test-suite name='User02 complex recurring store' ignore='yes'>
 		<test name='1' ignore='no'>
 			<description>User02 store to shared</description>
 			<request user="$userid2:" pswd="$pswd2:" print-response="no">
@@ -477,7 +477,7 @@
 		</test>
 	</test-suite>
 
-	<test-suite name='Complex freebusy' ignore='no'>
+	<test-suite name='Complex freebusy' ignore='yes'>
 		<test name='1' ignore='no'>
 			<description>User01 freebusy</description>
 			<request print-response='no'>
@@ -639,6 +639,61 @@
 		</test>
 	</test-suite>
 
+	<test-suite name='Prevent per-user data injection' ignore='no'>
+		<test name='1' ignore='no'>
+			<description>User01 new event with injected per-user data</description>
+			<request user="$userid1:" pswd="$pswd1:" end-delete="yes" print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarpath1:/1.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/peruser-data/inject/1.ics</filepath>
+				</data>
+				<verify>
+					<callback>prepostcondition</callback>
+					<arg>
+						<name>error</name>
+						<value>urn:ietf:params:xml:ns:caldavvalid-calendar-data</value>
+						<value>http://twistedmatrix.com/xml_namespace/dav/error-description</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+		<test name='2' ignore='no'>
+			<description>User01 new event with valid data</description>
+			<request user="$userid1:" pswd="$pswd1:" end-delete="yes" print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarpath1:/2.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/peruser-data/inject/2.ics</filepath>
+				</data>
+				<verify>
+					<callback>statusCode</callback>
+				</verify>
+			</request>
+		</test>
+		<test name='3' ignore='no'>
+			<description>User01 existing event with injected per-user data</description>
+			<request user="$userid1:" pswd="$pswd1:" print-response="no">
+				<method>PUT</method>
+				<ruri>$calendarpath1:/2.ics</ruri>
+				<data>
+					<content-type>text/calendar; charset=utf-8</content-type>
+					<filepath>Resource/CalDAV/sharing/peruser-data/inject/3.ics</filepath>
+				</data>
+				<verify>
+					<callback>prepostcondition</callback>
+					<arg>
+						<name>error</name>
+						<value>urn:ietf:params:xml:ns:caldavvalid-calendar-data</value>
+						<value>http://twistedmatrix.com/xml_namespace/dav/error-description</value>
+					</arg>
+				</verify>
+			</request>
+		</test>
+	</test-suite>
+
 	<end>
 		<request>
 			<method>DELETEALL</method>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100611/c5a23ff2/attachment.html>


More information about the calendarserver-changes mailing list