sabre-io / dav

sabre/dav is a CalDAV, CardDAV and WebDAV framework for PHP
http://sabre.io
BSD 3-Clause "New" or "Revised" License
1.53k stars 346 forks source link

ICS-Import causes HTTP 500 Error #999

Open dari6837 opened 7 years ago

dari6837 commented 7 years ago

ICS-Import causes HTTP 500 Error

I get the problem, when importing an event with the following properties:

See the following snippet of the ics-file.

[...] DTSTART;TZID=Europe/Berlin:20150408T100000 DTEND;TZID=Europe/Berlin:20150408T120000 EXDATE;TZID=Europe/Berlin:20150408T100000 RRULE:FREQ=WEEKLY;UNTIL=20150414T215959Z [...]

The full ics-file: import.ics.txt

I know that this ics is stupid, because no event will be added here. However a customer tried to import ics files containing these kind of events.

Expected behavior: Because the ics-file satisfies the RFC 5545, I would expect a HTTP status code between 200 and 300.

brunt82 commented 7 years ago

When I try to upload the ics, I get the following response from SabreDAV:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:sabredav-version>3.2.2</s:sabredav-version>
  <s:exception>Sabre\DAV\Exception\UnsupportedMediaType</s:exception>
  <s:message>Validation error in iCalendar: A calendar object on a CalDAV server MUST NOT have a METHOD property.</s:message>
</d:error>

When I remove the line "METHOD:PUBLISH" from the request body, I will get the described HTTP 500 error, but also an additional error text, maybe it helps you to find a solution:

<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:sabredav-version>3.2.2</s:sabredav-version>
  <s:exception>Sabre\VObject\Recur\NoInstancesException</s:exception>
  <s:message>This recurrence rule does not generate any valid instances</s:message>
</d:error>
brunt82 commented 7 years ago

688 seems to be the same one.