Subject: | breaks under taint mode |
When taint checks are turned on and $ENV{PATH} is tainted,
the eval block for running "infocmp -C" will throw an unhandled
exception.
The user only gets the general 'Can't find a valid termcap file'
error with no indication of the real problem.
Proposed patch attached. I'd add a test for this but it's rather hard to
inject taint tests in the current Test::More setup.
Originally reported by Anthony DeRobertis in http://bugs.debian.org/507228
Thanks for your work,
--
Niko Tyni
ntyni@debian.org
Subject: | 0002-Issue-a-warning-when-eval-infocmp-C-dies.patch |
From b49952983067ad9ad0127fcd70ade9ac2b25c89a Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Tue, 23 Nov 2010 15:04:42 +0200
Subject: [PATCH 2/2] Issue a warning when eval { `infocmp -C` } dies
When taint checks are turned on and $ENV{PATH} is tainted,
the eval block for running "infocmp -C" will throw an unhandled
exception.
The user only gets the general 'Can't find a valid termcap file'
error with no indication of the real problem.
Originally reported by Anthony DeRobertis in http://bugs.debian.org/507228
---
Cap.pm | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Cap.pm b/Cap.pm
index 004a03c..483c99d 100644
--- a/Cap.pm
+++ b/Cap.pm
@@ -296,6 +296,7 @@ sub Tgetent
$entry = $tmp;
}
};
+ warn "Can't run infocmp to get a termcap entry: $@" if $@;
}
else
{
--
1.7.2.3