summaryrefslogtreecommitdiff
path: root/taint.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1997-11-01 00:18:52 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1997-11-01 00:18:52 +0000
commitaf702f0e61214b54e323d12ffeaff4e64bee707c (patch)
tree2c9b5734fbd3c421d2d20c9e6877c8d10957e47c /taint.c
parentf890e7c81bc0e52bedc3dcefbcd144d0750c257d (diff)
parenta863c7d16499251f020c5d26d232aa865fa0b197 (diff)
downloadperl-af702f0e61214b54e323d12ffeaff4e64bee707c.tar.gz
Integrate mainline @ 18:15 CST 31 Oct 1997
p4raw-id: //depot/ansiperl@199
Diffstat (limited to 'taint.c')
-rw-r--r--taint.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/taint.c b/taint.c
index c8c6800c46..2dc43a4ab4 100644
--- a/taint.c
+++ b/taint.c
@@ -10,6 +10,7 @@
void
taint_proper(const char *f, char *s)
{
+ dTHR; /* just for taint */
char *ug;
DEBUG_u(PerlIO_printf(Perl_debug_log,
@@ -68,10 +69,12 @@ taint_env(void)
svp = hv_fetch(GvHVn(envgv),"PATH",4,FALSE);
if (svp && *svp) {
if (SvTAINTED(*svp)) {
+ dTHR;
TAINT;
taint_proper("Insecure %s%s", "$ENV{PATH}");
}
if ((mg = mg_find(*svp, 'e')) && MgTAINTEDDIR(mg)) {
+ dTHR;
TAINT;
taint_proper("Insecure directory in %s%s", "$ENV{PATH}");
}
@@ -81,6 +84,7 @@ taint_env(void)
/* tainted $TERM is okay if it contains no metachars */
svp = hv_fetch(GvHVn(envgv),"TERM",4,FALSE);
if (svp && *svp && SvTAINTED(*svp)) {
+ dTHR; /* just for taint */
bool was_tainted = tainted;
char *t = SvPV(*svp, na);
char *e = t + na;
@@ -99,6 +103,7 @@ taint_env(void)
for (e = misc_env; *e; e++) {
svp = hv_fetch(GvHVn(envgv), *e, strlen(*e), FALSE);
if (svp && *svp != &sv_undef && SvTAINTED(*svp)) {
+ dTHR; /* just for taint */
TAINT;
taint_proper("Insecure $ENV{%s}%s", *e);
}