Skip Menu |

This queue is for tickets about the HTTP-Date CPAN distribution.

Report information
The Basics
Id: 101378
Status: resolved
Priority: 0/
Queue: HTTP-Date

Owner: Nobody in particular
Requestors: torge.husfeldt [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: HTTP::Date::parse_date accepts iso-date with malformed TZ: "1996-02-29 12:00:00 -01::00"
Date: Wed, 07 Jan 2015 17:16:29 +0100
To: bug-HTTP-Date [...]
From: Torge Husfeldt <torge.husfeldt [...]>
Download (untitled) / with headers
text/plain 1.7k
Hi, to reproduce: Show quoted text
>perl -w -Mstrict -MHTTP::Date -e 'my ($yr, $mon, $day, $hr, $min, $sec,
$tz) = HTTP::Date::parse_date("1996-02-29 12:00:00 -01::00"); printf "%s\n", $tz;' -01::00 I guess the optional colon was indeed intended as a non-capturing, grouping paranthesis in this regexp: grep -C5 -nF '(:?' 158- (?:\s+|[-:Tt]) # separator before clock 159- (\d\d?):?(\d\d) # hour:min 160- (?::?(\d\d(?:\.\d*)?))? # optional seconds (and fractional) 161- )? # optional clock 162- \s* 163: ([-+]?\d\d?:?(:?\d\d)? 164- |Z|z)? # timezone (Z is "zero meridian", i.e. GMT) 165- \s*$ 166- /x) 167- Proposed patch attached. -- Torge Husfeldt Senior Anti-Abuse Engineer Abuse-Department 1&1 International 1&1 Internet Service GmbH | Brauerstraße 50 | 76135 Karlsruhe | Germany Phone: +49 721 91374-4795 E-Mail: | Web: Hauptsitz Montabaur, Amtsgericht Montabaur, HRB 20141 Geschäftsführer: Frank Einhellinger, Uwe Lamnek, Jan Oetjen Member of United Internet Diese E-Mail kann vertrauliche und/oder gesetzlich geschützte Informationen enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat sind oder diese E-Mail irrtümlich erhalten haben, unterrichten Sie bitte den Absender und vernichten Sie diese E-Mail. Anderen als dem bestimmungsgemäßen Adressaten ist untersagt, diese E-Mail zu speichern, weiterzuleiten oder ihren Inhalt auf welche Weise auch immer zu verwenden. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient of this e-mail, you are hereby notified that saving, distribution or use of the content of this e-mail in any way is prohibited. If you have received this e-mail in error, please notify the sender and delete the e-mail.
text/x-diff 629b

Message body is not shown because sender requested not to inline it.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to