1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/templates/event-request-spoofed.txt Mon May 18 18:42:27 2015 +0200
1.3 @@ -0,0 +1,34 @@
1.4 +Content-Type: multipart/alternative; boundary="===============0047278175=="
1.5 +MIME-Version: 1.0
1.6 +From: vincent.vole@example.com
1.7 +To: resource-room-confroom@example.com
1.8 +Subject: Spoofed request
1.9 +
1.10 +--===============0047278175==
1.11 +Content-Type: text/plain; charset="us-ascii"
1.12 +MIME-Version: 1.0
1.13 +Content-Transfer-Encoding: 7bit
1.14 +
1.15 +This message contains an event.
1.16 +--===============0047278175==
1.17 +MIME-Version: 1.0
1.18 +Content-Transfer-Encoding: 7bit
1.19 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
1.20 +
1.21 +BEGIN:VCALENDAR
1.22 +PRODID:-//MoinMessage/test_itip_event.py//EN
1.23 +METHOD:REQUEST
1.24 +VERSION:2.0
1.25 +BEGIN:VEVENT
1.26 +ORGANIZER:mailto:paul.boddie@example.com
1.27 +ATTENDEE;ROLE=CHAIR:mailto:paul.boddie@example.com
1.28 +ATTENDEE;RSVP=TRUE:mailto:resource-room-confroom@example.com
1.29 +DTSTAMP:20150125T000000Z
1.30 +DTSTART;TZID=Europe/Oslo:20150124T090000
1.31 +DTEND;TZID=Europe/Oslo:20150124T100000
1.32 +SUMMARY:Spoof test
1.33 +UID:spoof@example.com
1.34 +END:VEVENT
1.35 +END:VCALENDAR
1.36 +
1.37 +--===============0047278175==--
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/tests/templates/fb-request-all.txt Mon May 18 18:42:27 2015 +0200
2.3 @@ -0,0 +1,29 @@
2.4 +Content-Type: multipart/alternative; boundary="===============0945993647=="
2.5 +MIME-Version: 1.0
2.6 +From: paul.boddie@example.com
2.7 +To: resource-room-confroom@example.com
2.8 +
2.9 +--===============0945993647==
2.10 +Content-Type: text/plain; charset="us-ascii"
2.11 +MIME-Version: 1.0
2.12 +Content-Transfer-Encoding: 7bit
2.13 +
2.14 +This message contains a free/busy request.
2.15 +--===============0945993647==
2.16 +Content-Type: text/calendar; charset="us-ascii"; method="REQUEST"
2.17 +MIME-Version: 1.0
2.18 +Content-Transfer-Encoding: 7bit
2.19 +
2.20 +BEGIN:VCALENDAR
2.21 +PRODID:-//imip-agent/test//EN
2.22 +METHOD:REQUEST
2.23 +VERSION:2.0
2.24 +BEGIN:VFREEBUSY
2.25 +ORGANIZER:mailto:paul.boddie@example.com
2.26 +ATTENDEE:mailto:resource-room-confroom@example.com
2.27 +DTSTAMP:20141125T164400Z
2.28 +UID:fb2@example.com
2.29 +END:VFREEBUSY
2.30 +END:VCALENDAR
2.31 +
2.32 +--===============0945993647==--
3.1 --- a/tests/test_resource_invitation.sh Mon May 18 18:40:56 2015 +0200
3.2 +++ b/tests/test_resource_invitation.sh Mon May 18 18:42:27 2015 +0200
3.3 @@ -12,6 +12,15 @@
3.4 rm -r $STORE
3.5 rm -r $STATIC
3.6
3.7 + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
3.8 +| $SHOWMAIL \
3.9 +> out0.tmp
3.10 +
3.11 + grep -q 'METHOD:REPLY' out0.tmp \
3.12 +&& grep -q -v '^FREEBUSY' out0.tmp \
3.13 +&& echo "Success" \
3.14 +|| echo "Failed"
3.15 +
3.16 $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request.txt 2> /dev/null \
3.17 | $SHOWMAIL \
3.18 > out1.tmp
3.19 @@ -69,3 +78,15 @@
3.20 && grep -q -v 'FREEBUSY' out6.tmp \
3.21 && echo "Success" \
3.22 || echo "Failed"
3.23 +
3.24 + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/event-request-spoofed.txt 2> /dev/null \
3.25 +| $SHOWMAIL
3.26 +
3.27 + $RESOURCE_SCRIPT $ARGS < $TEMPLATES/fb-request-all.txt 2> /dev/null \
3.28 +| $SHOWMAIL \
3.29 +> out7.tmp
3.30 +
3.31 + grep -q 'METHOD:REPLY' out7.tmp \
3.32 +&& grep -q -v '^FREEBUSY' out7.tmp \
3.33 +&& echo "Success" \
3.34 +|| echo "Failed"