Skip Menu |

This queue is for tickets about the Data-ICal CPAN distribution.

Report information
The Basics
Id: 72719
Status: resolved
Priority: 0/
Queue: Data-ICal

People
Owner: Nobody in particular
Requestors: apm [...] one.com
jaska [...] kivela.net
Cc:
AdminCc:

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



Subject: VALARMs fail with taint-checks
Date: Mon, 31 Jan 2011 12:02:55 +0100
To: bug-Data-ICal [...] rt.cpan.org
From: Peter Mogensen <apm [...] one.com>
Using: Perl: 5.10.1 Data::ICal: Ubuntu, libdata-ical-perl 0.16+dfsg-1 The require in sub _parse_valarm of Data/ICal/Entry.pm fails under taintchecks. To reproduce: ================================================== #!/usr/bin/perl -T use strict; use warnings; use Data::ICal; local $/ = undef; my $data = <DATA>; $ENV{PATH} = ''; my $tainteddata = qx{/bin/echo "$data"}; my $calendar = Data::ICal->new(data => $tainteddata); print $calendar->as_string; __DATA__ BEGIN:VCALENDAR PRODID:-//script VERSION:2.0 BEGIN:VEVENT SUMMARY: Test DTSTART:20110312T083000 DTEND:20110312T093000 BEGIN:VALARM TRIGGER:-PT30M REPEAT:2 DURATION:PT15M ACTION:DISPLAY DESCRIPTION: Hey END:VALARM END:VEVENT END:VCALENDAR
Subject: Fwd: Data::ICal::Entry
Date: Fri, 25 Nov 2011 12:47:04 +0200
To: bug-data-ical [...] rt.cpan.org
From: Jaska Kivelä <jaska [...] kivela.net>
Could you please add untainting $action to _parse_valarm so that it would not die when using -T. --clip-- # alarms have actions sub _parse_valarm { my ( $parent, $object ) = @_; # ick my $action = $object->{properties}->{ACTION}->[0]->{value}; die "Can't parse VALARM with action $action" unless exists $_action_map{$action}; $action =~ /^(\w*)$/; $action = $1; my $alarm_class = "Data::ICal::Entry::Alarm::" . $_action_map{$action}; eval "require $alarm_class"; die "Failed to require $alarm_class : $@" if $@; $alarm_class->import; my $alarm = $alarm_class->new; $parent->_parse_generic_event( $alarm, $object ); $parent->add_entry($alarm); return $alarm; } --clap-- -- Jaska Kivelä jaska@kivela.net Katistentie 61 +358-40-5762988 FIN-13250 HÄMEENLINNA http://www.kivela.net/jaska/ Finland
Download signature.asc
application/pgp-signature 262b

Message body not shown because it is not plain text.

Fixed in 0.22