rrule parser blows up when datetimes contain colons

Bug #1201543 reported by Eric Casteleijn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dateutil
Invalid
Undecided
Unassigned

Bug Description

This:

        if line.find(':') != -1:
            name, value = line.split(':')
            if name != "RRULE":
                raise ValueError("unknown parameter name")
        else:
            value = line

blows up when passed a string like this:

"DTSTART:2013-07-17T23:00:00.000\nRRULE:FREQ=DAILY;UNTIL=2013-08-27T07:00:00.000"

with ValueError, too many values to unpack.

This would fix it:

name, value = line.split(':', 1)

Related branches

Revision history for this message
Tomi Hukkalainen (tpievila) wrote :

Are you sure this is even supposed to work? According to RFC 2445 4.3.4 and 4.3.12 the ical date times do not have colons. Not that this is different from ISO 8601.

Changed in dateutil:
status: New → Incomplete
Revision history for this message
Eric Casteleijn (thisfred) wrote : Re: [Bug 1201543] Re: rrule parser blows up when datetimes contain colons

Yeah, no, sorry for the confusion. Our usage was incorrect, I was
misinformed. Thanks for looking into it, sorry for wasting your time.

On Thu, Oct 31, 2013 at 5:34 AM, Tomi Pieviläinen <
<email address hidden>> wrote:

> Are you sure this is even supposed to work? According to RFC 2445 4.3.4
> and 4.3.12 the ical date times do not have colons. Not that this is
> different from ISO 8601.
>
> ** Changed in: dateutil
> Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1201543
>
> Title:
> rrule parser blows up when datetimes contain colons
>
> Status in python-dateutil:
> Incomplete
>
> Bug description:
> This:
>
> if line.find(':') != -1:
> name, value = line.split(':')
> if name != "RRULE":
> raise ValueError("unknown parameter name")
> else:
> value = line
>
> blows up when passed a string like this:
>
>
> "DTSTART:2013-07-17T23:00:00.000\nRRULE:FREQ=DAILY;UNTIL=2013-08-27T07:00:00.000"
>
> with ValueError, too many values to unpack.
>
> This would fix it:
>
> name, value = line.split(':', 1)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dateutil/+bug/1201543/+subscriptions
>

--
- eric casteleijn

Changed in dateutil:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.